{extends file="widgets/base/widget.tpl"}

{strip}
    {block name="et-widget-inline-styles"}
        {$smarty.block.parent}

        {block name='checkout-inc-steps-mobile'}
            {assign var=step1_active value=($bestellschritt[1] == 1 || $bestellschritt[2] == 1)}
            {assign var=step2_active value=($bestellschritt[3] == 1 || $bestellschritt[4] == 1)}
            {assign var=step3_active value=($bestellschritt[5] == 1)}

            {if $bestellschritt[1] != 3}
                <div class="container-fluid checkout-steps-mobile">
                    <div class="row">
                        <div class="col">
                            <nav class="nav" aria-label="{lang key='secureCheckout' section='checkout'}">
                                {block name='checkout-inc-steps-mobile-zero'}
                                    {* If we want to include the basket in a child theme, we use the following template: *}
                                    {* <a href="{get_static_route id='warenkorb.php'}"
                                        title="{lang section='global' key='basket'}"
                                        class="breadcrumb-link"
                                    >
                                        1
                                    </a>

                                    <span class="breadcrumb-divider"></span> *}
                                {/block}

                                {block name='checkout-inc-steps-mobile-first'}
                                    <a href="{get_static_route id='bestellvorgang.php'}?editRechnungsadresse=1"
                                        title="{lang section='account data' key='billingAndDeliveryAddress'}"
                                        class="breadcrumb-link {if $step1_active}active{/if}"
                                    >
                                        1
                                    </a>

                                    <span class="breadcrumb-divider"></span>
                                {/block}

                                {block name='checkout-inc-steps-mobile-second'}
                                    <a href="{get_static_route id='bestellvorgang.php'}?editVersandart=1"
                                        title="{lang section='account data' key='shippingAndPaymentOptions'}"
                                        class="breadcrumb-link {if $step2_active}active{/if}"
                                    >
                                        2
                                    </a>

                                    <span class="breadcrumb-divider"></span>
                                {/block}

                                {block name='checkout-inc-steps-mobile-third'}
                                    <span class="breadcrumb-link {if $step3_active}active{/if}">
                                        3
                                    </span>
                                {/block}

                                {block name='checkout-inc-steps-mobile-label'}
                                    <div class="breadcrumb-label">
                                        {if $step1_active}
                                            {lang section='account data' key='billingAndDeliveryAddress'}
                                        {elseif $step2_active}
                                            {lang section='account data' key='shippingAndPaymentOptions'}
                                        {elseif $step3_active}
                                            {lang section='checkout' key='summary'}
                                        {/if}
                                    </div>
                                {/block}
                            </nav>
                        </div>
                    </div>
                </div>
            {/if}
        {/block}
    {/block}

    {block name="et-widget-container-inner"}
        {block name='checkout-index-include-inc-steps'}
            {include file='checkout/inc_steps.tpl'}
        {/block}
        {block name='checkout-index-include-extension'}
            {include file='snippets/extension.tpl'}
        {/block}
        {if $step === 'accountwahl'}
            {include file='checkout/step0_login_or_register.tpl' loginOpenByDefault=$et_StandardCheckout.loginOpenByDefault companyOpenByDefault=$et_StandardCheckout.companyOpenByDefault}{*bestellvorgang_accountwahl.tpl*}
        {elseif $step === 'edit_customer_address' || $step === 'Lieferadresse'}
            {include file='checkout/step1_edit_customer_address.tpl' loginOpenByDefault=$et_StandardCheckout.loginOpenByDefault companyOpenByDefault=$et_StandardCheckout.companyOpenByDefault}{*bestellvorgang_unregistriert_formular.tpl*}
        {elseif $step === 'Versand' || $step === 'Zahlung'}
            {include file='checkout/step3_shipping_options.tpl' lazyLoadImages=$et_BaseWidget.lazyLoadImages}{*bestellvorgang_versand.tpl*}
        {elseif $step === 'ZahlungZusatzschritt'}
            {include file='checkout/step4_payment_additional.tpl'}{*bestellvorgang_zahlung_zusatzschritt*}
        {elseif $step === 'Bestaetigung'}
            {include file='checkout/step5_confirmation.tpl'
                commentOpenByDefault=$et_StandardCheckout.commentOpenByDefault
                couponOpenByDefault=$et_StandardCheckout.couponOpenByDefault
                lazyLoadImages=$et_BaseWidget.lazyLoadImages
                agbWrbCheckboxPosition=$et_StandardCheckout.agbWrbCheckboxPosition
                characteristicsLimit=$et_StandardCheckout.characteristicsLimit
                characteristicValuesLimit=$et_StandardCheckout.characteristicValuesLimit
                showVatRatePerPosition=$et_StandardCheckout.showVatRatePerPosition
            }
        {/if}
    {/block}
{/strip}