{$containerType = $Einstellungen.template.header.header_full_width|default:'B'}
{$tnt_coupons_showActionName = $tnt_coupons_showActionName|default:true}
{$tnt_coupons_showActionDesc = $tnt_coupons_showActionDesc|default:true}
<div class="tnt_coupons bg-primary px-3 py-2 overflow-x-auto"
     {if $tnt_coupons_show_modal}data-toggle="modal" data-bs-toggle="modal" data-target="#modalCoupons"
     data-bs-target="#modalCoupons" role="button"{/if}
     {if empty($tnt_coupons_balkenColor) === false}
        style="background-color: {$tnt_coupons_balkenColor} !important"
     {/if}>

    <div class="{if $tnt_coupons_showContainer|default:true}{if $containerType === 'B'}container{else}container-fluid {if $containerType === 'N'}container-fluid-xl{/if}{/if}{/if} w-100 d-flex justify-content-center justify-content-sm-between">
        <div class="d-none d-sm-flex me-3 mr-3 flex-column flex-lg-row-reverse justify-content-center flex-grow-1 flex-lg-grow-0 text-center align-items-center">
            <div class="">
                <span class="text-left fs-4 sale_description"
                        {if empty($tnt_coupons_txtColor) === false} style="{$tnt_coupons_txtColor}"{/if}>
                    {$tnt_cp_bar_content|default:''}
                </span>
            </div>
        </div>

        <div class="d-flex flex-column flex-lg-row justify-content-center">
            <div class="d-flex justify-content-start align-items-center mb-1 me-lg-3 me-0 mr-lg-3 mr-0">
                <span class="d-block d-sm-none me-1 mr-1">
                    <span{if empty($tnt_coupons_txtColor) === false} style="{$tnt_coupons_txtColor}"{/if}>
                        {$tnt_cp_bar_content|default:''}</span>
                </span>
            </div>
            {if isset($tnt_coupons_time_remaining)}
                <div class="countdown d-flex text-center justify-content-center justify-content-sm-end align-items-center">
                    {if $tnt_coupons_daysAsText}
                        {$daysAsText = $tnt_coupons_time_remaining->days}
                        {if substr($daysAsText, 0, 1) === '0'}
                            {$daysAsText = substr($daysAsText, 1)}
                        {/if}
                        <span class="mr-3"{if empty($tnt_coupons_txtColor) === false} style="{$tnt_coupons_txtColor}"{/if}>
                            <span class="text-nowrap">
                                {$tnt_coupons_lang_var_noch}
                                {if $tnt_coupons_time_remaining->days > 0}
                                    {$daysAsText}
                                {/if}
                            </span>
                            {if $tnt_coupons_time_remaining->days > 0}
                                {if $tnt_coupons_time_remaining->days > 1}
                                    {$tnt_coupons_lang_var_days}
                                {else}
                                    {$tnt_coupons_lang_var_day}
                                {/if}
                            {/if}
                        </span>
                    {else}
                        <div class="{if $tnt_coupons_time_remaining->days <= 0}d-none{/if}">
                            <div class="countdown-figures d-flex flex-row">
                                <div class="d-flex flex-column" title="{$tnt_coupons_lang_var_days}">
                                    <div class="bloc-time days d-flex flex-row text-danger"
                                         data-value="{$tnt_coupons_time_remaining->days}">
                                        <div class="figure days-1">0</div>
                                        <div class="figure days-2">0</div>
                                        <div class="figure days-3">0</div>
                                    </div>
                                    {if $showFigureLabels}
                                        <div class="small"{if empty($tnt_coupons_txtColor) === false} style="{$tnt_coupons_txtColor}"{/if}>
                                            {$tnt_coupons_lang_var_days}
                                        </div>
                                    {/if}
                                </div>
                            </div>
                        </div>
                    {/if}
                    <div class="countdown-figures d-flex flex-row">
                        <div class="d-flex flex-column" title="{$tnt_coupons_lang_var_hours}">
                            <div class="bloc-time hours d-flex flex-row text-danger"
                                 data-value="{$tnt_coupons_time_remaining->hours}">
                                <div class="figure hours-1">0</div>
                                <div class="figure hours-2">0</div>
                            </div>
                            {if $showFigureLabels}
                                <div class="small"{if empty($tnt_coupons_txtColor) === false} style="{$tnt_coupons_txtColor}"{/if}>
                                    {$tnt_coupons_lang_var_hours}
                                </div>
                            {/if}
                        </div>
                    </div>
                    <div class="countdown-figures d-flex flex-row">
                        <div class="d-flex flex-column" title="{$tnt_coupons_lang_var_minutes}">
                            <div class="bloc-time min d-flex flex-row text-danger"
                                 data-value="{$tnt_coupons_time_remaining->minutes}">
                                <div class="figure min-1">0</div>
                                <div class="figure min-2">0</div>
                            </div>
                            {if $showFigureLabels}
                                <div class="small"{if empty($tnt_coupons_txtColor) === false} style="{$tnt_coupons_txtColor}"{/if}>
                                    {$tnt_coupons_lang_var_minutes}
                                </div>
                            {/if}
                        </div>
                    </div>
                    <div class="countdown-figures d-flex flex-row">
                        <div class="d-flex flex-column" title="{$tnt_coupons_lang_var_seconds}">
                            <div class="bloc-time sec d-flex flex-row text-danger"
                                 data-value="{$tnt_coupons_time_remaining->seconds}">
                                <div class="figure sec-1">0</div>
                                <div class="figure sec-2">0</div>
                            </div>
                            {if $showFigureLabels}
                                <div class="small"{if empty($tnt_coupons_txtColor) === false} style="{$tnt_coupons_txtColor}"{/if}>
                                    {$tnt_coupons_lang_var_seconds}
                                </div>
                            {/if}
                        </div>
                    </div>
                </div>
            {/if}
        </div>
    </div>
</div>
