{block name='selectionwizard-question'}
    {et_isShopVersionAtLeast value="5.5.0-rc.1" assign='shopIsAtLeast55'}
    {if $nQuestion > $AWA->getCurQuestion()} <div class="list-group-wrapper disabled">{/if}
    <div class="list-group-item selection-wizard-question {if $nQuestion > $AWA->getCurQuestion()}disabled{else}px-0{/if}">
        {block name='selectionwizard-question-heading'}
            <div class="h5 selection-wizard-question-heading">
                {$oFrage->cFrage}
                {if $nQuestion < $AWA->getCurQuestion()}
                    <a href="#" data-value="{$nQuestion}" class="question-edit"><i class="{et_getIcon key="edit"}"></i></a>
                {/if}
            </div>
        {/block}
        {if $nQuestion < $AWA->getCurQuestion()}
            {block name='selectionwizard-question-answer-smaller'}
                <div class="row">
                    <div class="col col-4 col-sm-4 col-md-3 col-xl-2 selection-wizard-question-item">
                        <span class="selection-wizard-answer">
                            {$characteristicValue = $AWA->getSelectedValue($nQuestion)}
                            {if in_array($AWA->getConf('auswahlassistent_anzeigeformat'), ['B', 'BT'], true)}
                                {include file='snippets/image.tpl' item=$characteristicValue srcSize='sm'}
                            {/if}
                            {if in_array($AWA->getConf('auswahlassistent_anzeigeformat'), ['T', 'BT', 'S'], true)}
                                {$characteristicValue->getValue()}
                            {/if}
                        </span>
                    </div>
                </div>
            {/block}
        {elseif $nQuestion === $AWA->getCurQuestion()}
            {if $AWA->getConf('auswahlassistent_anzeigeformat') === 'S'}
                {block name='selectionwizard-question-answer-equals-s'}
                    <label for="kMerkmalWert-{$nQuestion}" class="sr-only">{lang key='pleaseChoose' section='global'}</label>
                    <select id="kMerkmalWert-{$nQuestion}" class="form-control custom-select">
                        <option value="-1">{lang key='pleaseChoose' section='global'}</option>
                        {foreach $oFrage->oWert_arr as $characteristicValue}
                            {if $characteristicValue->getCount() > 0}
                                <option value="{$characteristicValue->getID()}">
                                    {$characteristicValue->getValue()}
                                    {if $AWA->getConf('auswahlassistent_anzahl_anzeigen') === 'Y'}
                                        ({$characteristicValue->nAnzahl})
                                    {/if}
                                </option>
                            {/if}
                        {/foreach}
                    </select>
                {/block}
            {else}
                {block name='selectionwizard-question-answer-equals-other'}
                    <div class="row">
                        {foreach $oFrage->oWert_arr as $characteristicValue}
                            {if $characteristicValue->getCount() > 0}
                                <div class="col col-4 col-sm-4 col-md-3 col-xl-2 selection-wizard-question-item">
                                    <a class="selection-wizard-answer link-discreet" href="#" data-value="{$characteristicValue->getID()}">
                                        {if in_array($AWA->getConf('auswahlassistent_anzeigeformat'), ['B', 'BT'], true)}
                                            {include file='snippets/image.tpl' item=$characteristicValue srcSize='sm'}
                                        {/if}
                                        {if in_array($AWA->getConf('auswahlassistent_anzeigeformat'), ['T', 'BT'], true)}
                                            <span class="{block name='selectionwizard-question-answer-equals-other-text-clamp-class'}text-clamp-2{/block}">
                                                {$characteristicValue->getValue()}
                                                {if $AWA->getConf('auswahlassistent_anzahl_anzeigen') === 'Y'}
                                                    <span class="badge badge-outline-secondary">
                                                        {$characteristicValue->getCount()}{if $shopIsAtLeast55}<span class="sr-only"> {lang key='productsFound'}</span>{/if}
                                                    </span>
                                                {/if}
                                            </span>
                                        {/if}
                                    </a>
                                </div>
                            {/if}
                        {/foreach}
                    </div>
                {/block}
            {/if}
        {elseif $nQuestion > $AWA->getCurQuestion()}
            {block name='selectionwizard-question-anwser-bigger'}
                {if $AWA->getConf('auswahlassistent_anzeigeformat') === 'S'}
                    <label for="kMerkmalWert-{$nQuestion}" class="sr-only">{lang key='pleaseChoose' section='global'}</label>
                    <select id="kMerkmalWert-{$nQuestion}" class="form-control custom-select" disabled="disabled">
                        <option value="-1">{lang key='pleaseChoose' section='global'}</option>
                    </select>
                {else}
                    <div class="row">
                        {foreach $oFrage->oWert_arr as $characteristicValue}
                            {if $characteristicValue->getCount() > 0}
                                <div class="col col-4 col-sm-4 col-md-3 col-xl-2 selection-wizard-question-item">
                                    <span class="selection-wizard-answer">
                                        {if in_array($AWA->getConf('auswahlassistent_anzeigeformat'), ['B', 'BT'], true)}
                                            {include file='snippets/image.tpl' item=$characteristicValue srcSize='sm'}
                                        {/if}
                                        {if in_array($AWA->getConf('auswahlassistent_anzeigeformat'), ['T', 'BT'], true)}
                                            {$characteristicValue->getValue()}
                                        {/if}
                                    </span>
                                </div>
                            {/if}
                        {/foreach}
                    </div>
                {/if}
            {/block}
        {/if}
    </div>
    {if $nQuestion > $AWA->getCurQuestion()}</div>{/if}
{/block}
