{if $instance->getProperty('namingMode') == 'auto'}
  {assign var=optText value=__("chooseCategoryFrom")}
{elseif $instance->getProperty('namingMode') == 'defaultHead' && {$instance->getProperty('invitationText_dh')|strlen > 0}}
  {assign var=optText value={$instance->getProperty('invitationText_dh')}}
{elseif $instance->getProperty('namingMode') == 'custom' && {$instance->getProperty('invitationText_c')|strlen > 0}}
  {assign var=optText value={$instance->getProperty('invitationText_c')}}
{else}
  {assign var=optText value=__("chooseCategory")}
{/if}
{assign var=showLicenceAlert value={$portlet->showLicenceAlert()}}
<div id="{$instance->getUid()}"
  class="KategorieSchnellsuche {if $portlet->showLicenceAlert()} alert alert-danger{/if} {$instance->getStyleClasses()}"
  {if $showLicenceAlert}role="alert" {/if} style="{$instance->getStyleString()}" {$instance->getAttributeString()}
  data-portlet-src="{$portlet->getBaseUrl()}src/" data-portlet-option-text="{$optText}"
  data-portlet-option-aliaslist='{json_encode($instance->getProperty(dropdownAlias))}'
  data-portlet-option-reset='{$instance->getProperty(resetChoise)}'
  data-portlet-option-method="{$instance->getProperty('namingMode')}">
  {if $isPreview}
    {if $portlet->showLicenceAlert()}
      <p>{$portlet->showLicenceInfo()}</p>
      {assign var=dHintLink value="<a href='{$portlet->cinUrl()}'>{$portlet->cinUrlText()}</a>"}
      {assign var=hintText value=__("po_visit_cin")}
      {$dHint = sprintf($hintText, $dHintLink)}
      <p>{$dHint}</p>
    {/if}
    <div class="row">
      <div class="col col-auto">
        <button type="button" class="btn btn-primary btn-backward mb-3" disabled>
          <i class="fas fa-arrow-{if $instance->getProperty(arrowLeft)}left{else}up{/if}"></i>
        </button>
      </div>
      <div class="col select-container">
        <ul>
          <li class="container-item">
            {if $instance->getProperty('namingMode') == 'defaultHead' || $instance->getProperty('namingMode') == 'custom'}
              <div class="v-none">&nbsp;</div>
            {/if}
            {select class="custom-select v-none"}{/select}
            <div class="form-group text-left-util show">
              {if $instance->getProperty('namingMode') == 'defaultHead'}
                <div class="cin-ks-header">{__(headline)}</div>
              {elseif $instance->getProperty('namingMode') == 'custom'}
                <div class="cin-ks-header">{__('ownHeadline')}</div>
              {/if}
              <select class="form-control custom-select">
                <option value="" disabled selected>{$portlet->getDefaultText($instance)}</option>
              </select>
            </div>
          </li>
        </ul>
      </div>
    </div>
    {if $instance->getProperty('showBreadcrumbs')}
      {breadcrumb id="{$instance->getUid()}-breadcrumb" itemprop="breadcrumb" itemscope=true
      itemtype="https://schema.org/BreadcrumbList"}
      {assign var="choice1" value=__('choice_1')}
      {breadcrumbitem class="breadcrumb-arrow-right" href="#" title="{$choice1}"}
      <span itemprop="name">{$choice1}</span>
      {/breadcrumbitem}
      {/breadcrumb}
    {/if}
  {else}
    {$categoryList = $portlet->getCategories($instance)}
    <div class="row">
      <div class="col col-auto">
        <button type="button" class="btn btn-primary btn-backward mb-3" disabled>
          <i class="fas fa-arrow-{if $instance->getProperty(arrowLeft)}left{else}up{/if}"></i>
        </button>
      </div>
      <div class="col select-container">
        <ul class="">
          <li class="container-item show">
            {if $instance->getProperty('namingMode') == 'defaultHead' || $instance->getProperty('namingMode') == 'custom'}
              <div class="v-none">&nbsp;</div>
            {/if}
            {select class="custom-select v-none"}{/select}
            <div class="form-group text-left-util show">
              {if $instance->getProperty('namingMode') == 'defaultHead'}
                <div class="cin-ks-header">&nbsp;</div>
              {elseif $instance->getProperty('namingMode') == 'custom'}
                {assign var=alias value=$instance->getProperty('dropdownAlias')}
                <div class="cin-ks-header">{if isset($alias[0]) && $alias[0]|strlen > 0}{$alias[0]}{else}&nbsp;{/if}</div>
              {/if}
              <select class="form-control custom-select left-select show">
                <option value="--init" disabled selected>{$portlet->getDefaultText($instance)}</option>
                {foreach $categoryList as $category}
                  <option value="{if $category->hasSubcategories}{$category->getID()}{else}-1{/if}"
                    data-target="{$category->getURL()}">{$category->getName()}</option>
                {/foreach}
              </select>
            </div>
          </li>
        </ul>
      </div>
    </div>
    {if $instance->getProperty('showBreadcrumbs')}
      {breadcrumb id="{$instance->getUid()}-breadcrumb" itemprop="breadcrumb" itemscope=true
      itemtype="https://schema.org/BreadcrumbList"}
      &nbsp;
      {breadcrumbitem class="breadcrumb-arrow-right_" href='#' title=''}
      <span itemprop="name"></span>
      {/breadcrumbitem}
      {/breadcrumb}
    {/if}
    <script id="cin-portlet-kategorieschnellsuche-script" class="cin-portlet-script" type="text/javascript"
      src="{$instance->getPortlet()->getBaseUrl()}KategorieSchnellsuche.js">
      cin - portlet - kategorieschnellsuche - script
    </script>
  {/if}
</div>
