{if $Einstellungen.global.global_sichtbarkeit != 3 || JTL\Session\Frontend::getCustomer()->getID() > 0}
    <div class="et-menu-item et-menu-category-tree col-12{if $et_BaseWidget.cssClass !== ''} {$et_BaseWidget.cssClass}{/if}" id="et-menu-mobile-item-{$et_BaseWidget.id}" tabindex="0" role="button">
        {block name='et-menu-category-tree-mobile-link'}
            <a class="et-menu-item-link no-style"{if !empty($et_MenuCategoryTree.image.src)} style="background-image: url('{if !empty($et_MenuCategoryTree.image.srcWebP)}{$et_MenuCategoryTree.image.srcWebP}{else}{$et_MenuCategoryTree.image.src}{/if}');"{/if}>
                <div class="et-menu-item-title">
                    {assign var="titleIcon" value="{if !empty($et_MenuCategoryTree.icon)}<i class=\"{$et_MenuCategoryTree.icon}\"></i>{/if}"}
                    {if empty($et_MenuCategoryTree.label.value)}
                        {$titleIcon}<span>{lang key="categories" section="global"}</span>
                    {else}
                        {$titleIcon}{include file="widgets/base/textfield.tpl" value=$et_MenuCategoryTree.label type="span"}
                    {/if}
                </div>
            </a>
        {/block}
        {if $et_MenuCategoryTree.loadAsync && !$et_MenuCategoryTree.isAjax}
            {block name='et-menu-category-tree-mobile-content-loader'}
                <div class="et-menu-item-content et-menu-category-tree-mobile-content d-none" data-et-menu-async-load="{$et_BaseWidget.id}">
                    <div class="et-menu-async-loader"><i class="et-icon-spin {et_getIcon key="loading"}"></i></div>
                </div>
            {/block}
        {else}
            {block name='et-menu-category-tree-mobile-content'}
                <div class="et-menu-item-content et-menu-category-tree-mobile-content d-none">
                    <div class="row">
                        {get_category_array categoryId=0 assign='categories'}
                        {if !empty($categories)}
                            {* $category->isOrphaned does not exist before 5.0.2 *}
                            {et_isShopVersionAtLeast value="5.0.2" assign='shopIsAtLeast502'}
                            {foreach $categories as $category}
                                {if !$shopIsAtLeast502 || $category->isOrphaned() === false}
                                    <div class="col-12 et-menu-category-tree-category et-menu-category-tree-root-category">
                                        <a class="link-discreet" href="{$category->getURL()}" title="{$category->getName()}">{$category->getShortName()}</a>
                                        {if $category->hasChildren()}
                                            <div class="row subcategory-wrapper subcategory-level-1">
                                                {if !empty($category->getChildren())}{assign var=sub_categories value=$category->getChildren()}{else}{get_category_array categoryId=$category->getID() assign='sub_categories'}{/if}
                                                {foreach $sub_categories as $subCategory}
                                                    <div class="col-12 et-menu-category-tree-category et-menu-category-tree-sub-category">
                                                        <a class="link-discreet" href="{$subCategory->getURL()}" title="{$subCategory->getName()}">{$subCategory->getShortName()}</a>
                                                        {if $subCategory->hasChildren()}
                                                            <div class="row subcategory-wrapper subcategory-level-2">
                                                                {if !empty($subCategory->getChildren())}{assign var=sub_sub_categories value=$subCategory->getChildren()}{else}{get_category_array categoryId=$subCategory->getID() assign='sub_sub_categories'}{/if}
                                                                {foreach $sub_sub_categories as $subSubCategory}
                                                                    <div class="col-12 et-menu-category-tree-category et-menu-category-tree-sub-category">
                                                                        <a class="link-discreet" href="{$subSubCategory->getURL()}" title="{$subSubCategory->getName()}">{$subSubCategory->getShortName()}</a>
                                                                    </div>
                                                                {/foreach}
                                                            </div>
                                                        {/if}
                                                    </div>
                                                {/foreach}
                                            </div>
                                        {/if}
                                    </div>
                                {/if}
                            {/foreach}
                        {/if}
                    </div>
                </div>
            {/block}
        {/if}
    </div>
{/if}