import { backTicks, codeBlock } from '../../../libs/markdown/index.js';
export function indexSignature(model) {
    const useCodeBlocks = this.options.getValue('useCodeBlocks');
    const params = model.parameters
        ? model.parameters.map((parameter) => {
            return parameter.type
                ? `${useCodeBlocks ? parameter.name : backTicks(parameter.name)}: ${this.partials.someType(parameter.type)}`
                : '';
        })
        : [];
    if (model.type) {
        if (this.options.getValue('useCodeBlocks')) {
            return codeBlock(`[${params.join('')}]: ${this.partials.someType(model.type)}`);
        }
        return `\\[${params.join('')}\\]: ${this.partials.someType(model.type)}`;
    }
    return '';
}
