<ol class="breadcrumb">
  <li>Interfaces</li>
  <li>{{name}}</li>
</ol>

<ul class="nav nav-tabs" role="tablist">
    <li class="active">
        <a href="#info" id="info-tab" role="tab" data-toggle="tab" data-link="info">Info</a>
    </li>

    {{#if interface.readme}}
    <li>
        <a href="#readme" role="tab" id="readme-tab" data-toggle="tab" data-link="readme">README</a>
    </li>
    {{/if}}

    {{#unless disableSourceCode}}
    <li>
        <a href="#source" role="tab" id="source-tab" data-toggle="tab" data-link="source">Source</a>
    </li>
    {{/unless}}
</ul>

<div class="tab-content">
    <div class="tab-pane fade active in" id="c-info">
        <p class="comment">
            <h3>File</h3>
        </p>
        <p class="comment">
            <code>{{interface.file}}</code>
        </p>

        {{#if interface.description}}
            <p class="comment">
                <h3>Description</h3>
            </p>
            <p class="comment">
                {{{parseDescription interface.description depth}}}
            </p>
        {{/if}}

        {{#if interface.extends}}
            <p class="comment">
                <h3>Extends</h3>
            </p>
            <p class="comment">
                {{> link-type type=interface.extends }}
            </p>
        {{/if}}

        {{#orLength interface.properties interface.methods}}
        <section>
            <h3 id="index">Index</h3>
            <table class="table table-sm table-bordered index-table">
                <tbody>
                    {{#compare interface.properties.length ">" 0}}
                    <tr>
                        <td class="col-md-4">
                            <h6><b>Properties</b></h6>
                        </td>
                    </tr>
                    <tr>
                        <td class="col-md-4">
                            <ul class="index-list">
                            {{#each interface.properties}}
                                <li>
                                    {{#if name}}
                                        <a href="#{{name}}">{{name}}</a>
                                    {{else}}
                                        <a href="#{{id}}">Unamed property</a>
                                    {{/if}}
                                </li>
                            {{/each}}
                            </ul>
                        </td>
                    </tr>
                    {{/compare}}
                    {{#compare interface.methods.length ">" 0}}
                    <tr>
                        <td class="col-md-4">
                            <h6><b>Methods</b></h6>
                        </td>
                    </tr>
                    <tr>
                        <td class="col-md-4">
                            <ul class="index-list">
                            {{#each interface.methods}}
                                <li>
                                    {{#each modifierKind}}
                                        <span class="modifier">{{modifKind this}}</span>
                                    {{/each}}
                                    <a href="#{{name}}">{{name}}</a>
                                </li>
                            {{/each}}
                            </ul>
                        </td>
                    </tr>
                    {{/compare}}
                </tbody>
            </table>
        </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>
                <h3 id="inputs">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"><b>{{name}}</b><a href="#{{name}}"><span class="fa fa-link"></span></a></span>
                                    </td>
                                </tr>
                                <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>Default value : </i><code>{{{clean-paragraph tag.comment}}}</code>
                                    </td>
                                </tr>
                                {{/jsdoc-default}}

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

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

                            {{else}}

                                {{#if args}}
                                    <tr>
                                        <td class="col-md-4">
                                            <i>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>Returns : </i>{{> link-type type=returnType }}
                                        </td>
                                    </tr>
                                {{/if}}

                                {{#if jsdoctags}}
                                    {{#jsdoc-params-valid jsdoctags}}
                                    <tr>
                                        <td class="col-md-4">
                                          <div class="io-description">
                                              {{#jsdoc-params jsdoctags}}
                                                  <b>Parameters :</b>
                                                  <table class="params">
                                                      <thead>
                                                          <tr>
                                                              <td>Name</td>
                                                              <td>Type</td>
                                                              <td>Description</td>
                                                          </tr>
                                                      </thead>
                                                      <tbody>
                                                          {{#each tags}}
                                                              <tr>
                                                                <td>{{name}}</td>
                                                                <td>
                                                                    {{#if type}}
                                                                      {{> link-type type=type }}
                                                                    {{/if}}
                                                                </td>
                                                                <td>{{{comment}}}</td>
                                                              </tr>
                                                          {{/each}}
                                                      </tbody>
                                                  </table>
                                              {{/jsdoc-params}}
                                              {{#jsdoc-example jsdoctags}}
                                                  <b>Example :</b>
                                                  {{#each tags}}
                                                      <div class="jsdoc-example-ul">
                                                          {{{comment}}}
                                                      </div>
                                                  {{/each}}
                                              {{/jsdoc-example}}
                                          </div>
                                        </td>
                                    </tr>
                                    {{/jsdoc-params-valid}}
                                {{/if}}

                            {{/if}}

                            {{#if line}}
                                {{#unless ../disableSourceCode}}
                                    <tr>
                                        <td class="col-md-4">
                                            <div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../interface.file}}:{{{line}}}</a></div>
                                        </td>
                                    </tr>
                                {{/unless}}
                            {{/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}}
    </div>

    {{#if interface.readme}}
    <div class="tab-pane fade" id="c-readme">
        <p>{{{interface.readme}}}</p>
    </div>
    {{/if}}

    {{#unless disableSourceCode}}
    <div class="tab-pane fade tab-source-code" id="c-source">
        <pre class="line-numbers"><code class="language-typescript">{{ interface.sourceCode}}</code></pre>
    </div>
    {{/unless}}
</div>
