mixin sideMenuEntry(id, selectMoreId , title, content, contentRoot, disabledSection)
  .nav-section(disabled=disabledSection)
    hr.long-hr-gray-3
    .nav-section-header
      span(class=disabledSection ? 'disabled-opacity' : '')= title
      span.btn-area
        button.border-0(
          id=selectMoreId
          type="button"
          data-bs-toggle="modal"
          data-bs-target="#modal-filter"
          disabled=disabledSection
        )
          span.select-more-text= t('IZBERI VEČ')
          .ps-2
            img(src="/images/fi_copy.svg" alt="")
    ul.nav-section-content(id=id)
      //- root struct check in case of empty results
      if contentRoot && !!content
        - let isAtLeastOneChecked = content.filter(c => c.checked).length > 0
        each item in content
          li(id=item.id)
            if item.checked
              a
                div
                  img(src="/images/square-checkbox-solid.svg" alt="")
                span.nav-section-content-desc #{ item.name }
                span #{ item.hits }
            else
              a.sel-anchr(href="#" class=isAtLeastOneChecked ? 'd-none' : '')
                div
                  img(src="/images/chevron-right.svg" alt="")
                span.nav-section-content-desc #{ item.name }
                span #{ item.hits }
        if isAtLeastOneChecked
          a.showall(href="#" id='show-all-' + id)
            img(src="/images/chevron-left-blue.svg" alt="")
            span= t('PRIKAŽI VSE')

mixin sfSideNavigation(sideNavigationData)
  .admin-nav
    #admin-nav-mobile.admin-nav-mobile
      .mobile-left-holder
        button#nav-button.nav-button
          img#burger-menu-img(
            src="/images/burger-menu-button-icon.svg"
            alt="Meni"
          )
        span#nav-title.nav-title= t('Iskanje po slovarjih')
      #mobile-right-holder
    nav
      .admin-nav-content.slidable.sf-min-h.nav-bg.ps-2rem.sf-correct
        .search-filter-nav-content.w24rem.me-0.ps-2rem.pe-0
          .slidable-list.scroller-style
            a#clear-filters.clear-filter-section.d-flex(href="#")
              img.align-self-center(src="/images/square-minus.svg" alt="")
              span.ps-2.fs-075rem.fw-400= t('POČISTI FILTRE')
            +sideMenuEntry("src-lang-side", "select-src-langs", t("Jeziki iskanja"), sideNavigationData.sourceLanguages, sideNavigationData, disabledSideMenuFilters.sourceLanguages)
            +sideMenuEntry("dest-lang-side", "select-dest-langs", t("Ciljni jeziki"), sideNavigationData.targetLanguages, sideNavigationData, disabledSideMenuFilters.targetLanguages)
            +sideMenuEntry("domain-side", "select-domains", t("Področja"), sideNavigationData.primaryDomains, sideNavigationData, disabledSideMenuFilters.primaryDomains)
            +sideMenuEntry("dict-side", "select-dicts", t("Slovarji"), sideNavigationData.dictionaries, sideNavigationData, disabledSideMenuFilters.dictionaries)
            +sideMenuEntry("source-side", "select-sources", t("Viri"), sideNavigationData.sources, sideNavigationData, disabledSideMenuFilters.sources)
