"use strict";

customElements.define(
  "compodoc-menu",
  class extends HTMLElement {
    constructor() {
      super();
      this.isNormalMode = this.getAttribute("mode") === "normal";
    }

    connectedCallback() {
      this.render(this.isNormalMode);
    }

    render(isNormalMode) {
      let tp = lithtml.html(`
        <nav>
            <ul class="list">
                <li class="title">
                    <a href="index.html" data-type="index-link">Sinergial Advance Documentación</a>
                </li>
                <li class="divider"></li>
                <li class="chapter">
                    <a data-type="chapter-link" href="index.html"><span class="icon ion-ios-home"></span>Comenzando</a>
                    <ul class="links">
                        <li class="link">
                            <a href="index.html" data-type="chapter-link">
                                <span class="icon ion-ios-paper"></span>Léeme
                            </a>
                        </li>
                        <li class="link">
                            <a href="properties.html" data-type="chapter-link">
                                <span class="icon ion-ios-apps"></span>Versión
                            </a>
                        </li>
                    </ul>
                </li>
                    <li class="chapter additional">
                        <div class="simple menu-toggler" data-bs-toggle="collapse" ${
                          isNormalMode
                            ? 'data-bs-target="#additional-pages"'
                            : 'data-bs-target="#xs-additional-pages"'
                        }>
                            <span class="icon ion-ios-book"></span>
                            <span>Changelog</span>
                            <span class="icon ion-ios-arrow-down"></span>
                        </div>
                        <ul class="links collapse " ${isNormalMode ? 'id="additional-pages"' : 'id="xs-additional-pages"'}>
                                    <li class="chapter inner">
                                        <a data-type="chapter-link" href="additional-documentation/changelog.html" data-context-id="additional">
                                            <div class="menu-toggler linked" data-bs-toggle="collapse" ${
                                              isNormalMode
                                                ? 'data-bs-target="#additional-page-fa0559c56cfdcd85ee2a4de77d473f7a7f3a6bbd01a8a53198ae77457a980b0c2dad6e51eb00659bc8e4d94ae2cb5b2e046dea75068cb964a88f1ceb61d93c57"'
                                                : 'data-bs-target="#xs-additional-page-fa0559c56cfdcd85ee2a4de77d473f7a7f3a6bbd01a8a53198ae77457a980b0c2dad6e51eb00659bc8e4d94ae2cb5b2e046dea75068cb964a88f1ceb61d93c57"'
                                            }>
                                                <span class="link-name">Versiones</span>
                                                <span class="icon ion-ios-arrow-down"></span>
                                            </div>
                                        </a>
                                        <ul class="links collapse" ${isNormalMode ? 'id="additional-page-fa0559c56cfdcd85ee2a4de77d473f7a7f3a6bbd01a8a53198ae77457a980b0c2dad6e51eb00659bc8e4d94ae2cb5b2e046dea75068cb964a88f1ceb61d93c57"' : 'id="xs-additional-page-fa0559c56cfdcd85ee2a4de77d473f7a7f3a6bbd01a8a53198ae77457a980b0c2dad6e51eb00659bc8e4d94ae2cb5b2e046dea75068cb964a88f1ceb61d93c57"'}>
                                            <!-- Aca insertar enlace para nueva version -->
											<li class="link for-chapter2">
                                                <a href="additional-documentation/changelog/5.0.0.html" data-type="entity-link" data-context="sub-entity" data-context-id="additional">5.0.0</a>
                                            </li>
											<li class="link for-chapter2">
                                                <a href="additional-documentation/changelog/4.0.0.html" data-type="entity-link" data-context="sub-entity" data-context-id="additional">4.0.0</a>
                                            </li>
                                            <li class="link for-chapter2">
                                                <a href="additional-documentation/changelog/3.1.0.html" data-type="entity-link" data-context="sub-entity" data-context-id="additional">3.1.0</a>
                                            </li>
                                            <li class="link for-chapter2">
                                                <a href="additional-documentation/changelog/3.0.0.html" data-type="entity-link" data-context="sub-entity" data-context-id="additional">3.0.0</a>
                                            </li>
                                            <li class="link for-chapter2">
                                                <a href="additional-documentation/changelog/2.0.0.html" data-type="entity-link" data-context="sub-entity" data-context-id="additional">2.0.0</a>
                                            </li>
                                            <li class="link for-chapter2">
                                                <a href="additional-documentation/changelog/1.1.0.html" data-type="entity-link" data-context="sub-entity" data-context-id="additional">1.1.0</a>
                                            </li>
                                        </ul>
                                    </li>
                        </ul>
                    </li>
            </ul>
        </nav>
        `);
      this.innerHTML = tp.strings;
    }
  },
);
