{{#orLength interface.properties interface.methods}}
<section data-compodoc="block-index">
    <h3 id="index">{{t "index" }}</h3>
    {{#compare interface.properties.length ">" 0}}
    <table class="table table-sm table-bordered index-table">
        <tbody>
            <tr>
                <td class="col-md-3">
                    <h6><b>{{t "properties" }}</b></h6>
                </td>
                <td class="col-md-9">
                    <ul class="index-list">
                    {{#each interface.properties}}
                        <li>
                            {{#if name}}
                                {{#if optional}}
                                    <span class="modifier">{{t "optional" }}</span>
                                {{/if}}
                                <a href="#{{name}}" class="reference-link {{#if deprecated}}deprecated-name{{/if}}">
                                    <span class="reference-badge reference-badge--property" aria-hidden="true">P</span><span class="reference-link-label">{{name}}</span>
                                </a>
                            {{else}}
                                {{#if id}}
                                    <a href="#{{id}}" class="reference-link"><span class="reference-badge reference-badge--property" aria-hidden="true">P</span><span class="reference-link-label">{{t "unamed-property" }}</span></a>
                                {{/if}}
                            {{/if}}
                        </li>
                    {{/each}}
                    </ul>
                </td>
            </tr>
        </tbody>
    </table>
    {{/compare}}
    {{#compare interface.methods.length ">" 0}}
    <table class="table table-sm table-bordered index-table">
        <tbody>
            <tr>
                <td class="col-md-3">
                    <h6><b>{{t "methods" }}</b></h6>
                </td>
                <td class="col-md-9">
                    <ul class="index-list">
                    {{#each interface.methods}}
                        <li>
                            {{#each modifierKind}}
                                <span class="modifier">{{modifKind this}}</span>
                            {{/each}}
                            {{#if optional}}
                                <span class="modifier">{{t "optional" }}</span>
                            {{/if}}
                            <a href="#{{name}}" class="reference-link {{#if deprecated}}deprecated-name{{/if}}">
                                <span class="reference-badge reference-badge--method" aria-hidden="true">M</span><span class="reference-link-label">{{name}}</span>
                            </a>
                        </li>
                    {{/each}}
                    </ul>
                </td>
            </tr>
        </tbody>
    </table>
    {{/compare}}
</section>
{{/orLength}}

{{#if interface.methods}}
    {{> block-method methods=interface.methods file=interface.file }}
{{/if}}

{{#if interface.indexSignatures}}
    {{> block-index indexables=interface.indexSignatures file=interface.file }}
{{/if}}

{{#if interface.properties}}
    <section data-compodoc="block-properties">
        <h3 id="inputs">{{t "properties" }}</h3>
        {{#each interface.properties}}
            <table class="table table-sm table-bordered">
                <tbody>
                    {{#if name}}
                        <tr>
                            <td class="col-md-4">
                                <a name="{{name}}"></a>
                                <span class="name {{#if deprecated}}deprecated-name{{/if}}"><b>{{name}}</b>
                                    <a href="#{{name}}">
                                        <span class="icon ion-ios-link"></span>
                                    </a>
                                </span>
                            </td>
                        </tr>
                        {{#if deprecated}}
                        <tr>
                            <td class="col-md-4 deprecated">
                                {{{ deprecationMessage }}}
                            </td>
                        </tr>
                        {{/if}}
                        <tr>
                            <td class="col-md-4">
                                <code>{{name}}: {{> link-type type=type }}</code>
                            </td>
                        </tr>

                        {{#jsdoc-default jsdoctags}}
                        <tr>
                            <td class="col-md-4">
                                <i>{{t "default-value" }} : </i><code>{{{clean-paragraph tag.comment}}}</code>
                            </td>
                        </tr>
                        {{/jsdoc-default}}

                        {{#if type}}
                            <tr>
                                <td class="col-md-4">
                                    <i>{{t "type" }} : </i>{{> link-type type=type }}
                                </td>
                            </tr>
                        {{/if}}

                        {{#if subProperties}}
                            <tr>
                                <td class="col-md-4">
                                    <div class="io-nested-properties">
                                        <i>{{t "properties" }} :</i>
                                        <ul class="index-list">
                                            {{#each subProperties}}
                                                <li>
                                                    <span class="io-nested-property-name"><code>{{name}}{{#if optional}}?{{/if}}: {{> link-type type=type }}</code></span>
                                                    {{#if description}}
                                                        <div class="io-description">{{{parseDescription description ../../depth}}}</div>
                                                    {{/if}}
                                                </li>
                                            {{/each}}
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                        {{/if}}

                        {{#if optional}}
                            <tr>
                                <td class="col-md-4">
                                    <i>{{t "optional" }}</i>
                                </td>
                            </tr>
                        {{/if}}

                        {{#if defaultValue}}
                            <tr>
                                <td class="col-md-4">
                                    <i>{{t "default-value" }}: </i><code>{{defaultValue}}</code>
                                </td>
                            </tr>
                        {{/if}}

                    {{else}}

                        {{#if args}}
                            <tr>
                                <td class="col-md-4">
                                    <i>{{t "signature" }} :</i>
                                    <a name="{{id}}"></a>
                                    <code>
                                        <!--ts.SyntaxKind.CallSignature-->
                                        {{#compare ../interface.kind "===" 151 }}
                                            {{{functionSignature this}}}
                                        {{else}}
                                            {{indexableSignature this}}
                                        {{/compare}}
                                    </code>
                                </td>
                            </tr>
                        {{/if}}


                        {{#if returnType}}
                            <tr>
                                <td class="col-md-4">
                                    <i>{{t "returns" }} : </i>{{> link-type type=returnType }}
                                </td>
                            </tr>
                        {{/if}}

                        {{#if jsdoctags}}
                            {{#jsdoc-throws jsdoctags}}
                                <tr>
                                    <td class="col-md-4">
                                        <div class="io-description">
                                            <b>{{t "throws" }} :</b>
                                            <ul>
                                                {{#each tags}}
                                                    <li>{{{comment}}}</li>
                                                {{/each}}
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                            {{/jsdoc-throws}}
                        {{/if}}

                        {{#if jsdoctags}}
                            {{#jsdoc-params-valid jsdoctags}}
                            <tr>
                                <td class="col-md-4">
                                    <div class="io-description">
                                        {{#jsdoc-params jsdoctags}}
                                            <b>{{t "parameters" }} :</b>
                                            <table class="params">
                                                <thead>
                                                        <tr>
                                                            <td>{{t "name" }}</td>
                                                            {{#one-parameter-has tags 'type'}}
                                                                <td>{{t "type" }}</td>
                                                            {{/one-parameter-has}}
                                                            {{#one-parameter-has tags 'comment'}}
                                                                <td>{{t "description" }}</td>
                                                            {{/one-parameter-has}}
                                                        </tr>
                                                </thead>
                                                <tbody>
                                                    {{#each tags}}
                                                        <tr>
                                                            {{#if name}}
                                                                <td>{{name}}</td>
                                                            {{/if}}
                                                            {{#one-parameter-has ../tags 'type'}}
                                                                <td>
                                                                    {{#if type}}
                                                                        {{> link-type type=type }}
                                                                    {{/if}}
                                                                </td>
                                                            {{/one-parameter-has}}
                                                            {{#one-parameter-has ../tags 'comment'}}
                                                                <td>
                                                                    {{#if comment}}
                                                                        <code>{{{comment}}}</code>
                                                                    {{/if}}
                                                                </td>
                                                            {{/one-parameter-has}}
                                                        </tr>
                                                    {{/each}}
                                                </tbody>
                                            </table>
                                        {{/jsdoc-params}}
                                        {{#jsdoc-example jsdoctags}}
                                            <b>{{t "example" }} :</b>
                                            {{#each tags}}
                                                <div class="jsdoc-example-ul">
                                                    {{{comment}}}
                                                </div>
                                            {{/each}}
                                        {{/jsdoc-example}}
                                    </div>
                                </td>
                            </tr>
                            {{/jsdoc-params-valid}}
                        {{/if}}

                    {{/if}}

                    {{#if line}}
                        {{#isTabEnabled ../navTabs "source"}}
                            <tr>
                                <td class="col-md-4">
                                    <div class="io-line">{{t "defined-in" }} <a href="" data-line="{{{line}}}" class="link-to-prism">{{../interface.file}}:{{{line}}}</a></div>
                                </td>
                            </tr>
                        {{/isTabEnabled}}
                    {{/if}}

                    {{#if description}}
                    <tr>
                        <td class="col-md-4">
                            <div class="io-description">{{{parseDescription description ../depth}}}</div>
                        </td>
                    </tr>
                    {{/if}}
                </tbody>
            </table>
        {{/each}}
    </section>
{{/if}}
