{assign var="templateName" value=""}
{if isset($template)}
    {$templateName = $template->getMainName()}
{/if}
{assign var="translationMethod" value="custom"}
{if isset($settings['translation-method'])}
    {$translationMethod = $settings['translation-method']}
{/if}
<div class="inputs-container">
    <div class="inputs-container__section">
        <div class="section">
            <div class="section__header top">
                <h6 class="top__title">
                    {if $level == 1}Sub-{/if}Menu Item
                </h6>
            </div>
            <div class="section__content">
                <div class="well">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="form-label">
                                    Type
                                    {if isset($tooltips.menu.menu_items.type)}
                                        {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.type}
                                    {/if}
                                </label>
                                
                                <select
                                    class="form-control type-{$parent}-{$index} opacity-1"
                                    name="items[{$parent}][{$index}][type]"
                                    data-translation-method="{if isset($settings['translation-method']) && !empty($settings['translation-method'])}{$settings['translation-method']}{else}custom{/if}"
                                    data-menu-item-type
                                    data-parent="{$parent}"
                                    data-index="{$index}"
                                    data-level="{$level}"
                                    data-location="{$location}"
                                    data-ajax-url="{$helper->url('Menu@changeType',['templateName'=>$templateName, 'location' => $location])}"
                                    data-whmcs-var="{if isset($translations['whmcs'])}{$translations['whmcs']}{/if}"
                                    data-prev-value="{foreach $types as $type}{if $type->view === $typeView}{$type->name}{/if}{/foreach}"
                                    data-selectize-disable-search
                                    data-icon="{if isset($settings.icon)}{$settings.icon}{/if}"
                                    data-predefined-icon="{if isset($settings.predefined_icon)}{$settings.predefined_icon}{/if}"
                                    data-media="{if isset($settings.media)}{$settings.media}{/if}"
                                    data-predefined-illustration="{if isset($settings.predefined_illustration)}{$settings.predefined_illustration}{/if}"
                                >
                                   
                                    {assign 'sortedTypes' ["WHMCS Page","Custom Link","Homepage","Predefined List","Divider","WHMCS Notifications","Client Account", "Language", "Currency Switcher", "Header", "Header Collapse", "Mode Switcher", "Support Hours"]}
                                    
                                    {foreach $sortedTypes as $sType}
                                        {foreach $types as $type}
                                            {if $sType == $type->name}
                                            {if $level == 0 && $type->name !== 'Divider' && $type->name !== 'Predefined List' && $type->name !== "Header" && $type->name !== "Header Collapse"}
                                                {if $location === 'Footer'}
                                                    {if $type->name !== 'WHMCS Notifications' && $type->name !== 'Client Account' && $type->name !== 'Mode Switcher' && $type->name != "Support Hours"}
                                                        <option value="{$type->name}" {if $type->view === $typeView} selected {/if}>{$type->name}</option>
                                                    {/if}    
                                                {elseif ($location === "Main Menu")}
                                                    {if $type->name != "Support Hours"}
                                                        <option value="{$type->name}" {if $type->view === $typeView} selected {/if}>{$type->name}</option>
                                                    {/if}        
                                                {else}
                                                    <option value="{$type->name}" {if $type->view === $typeView} selected {/if}>{$type->name}</option>
                                                {/if}
                                            {elseif $level == 1 && $type->name !== 'Client Account' && $type->name !== 'Language' && $type->name !== 'WHMCS Notifications' && $type->name !== 'Currency Switcher' && $type->name !== 'Mode Switcher'}
                                                {if $location === 'Footer'}
                                                    {if $type->name !== 'Divider' && $type->name !== "Header" && $type->name != "Support Hours"}
                                                        <option value="{$type->name}" {if $type->view === $typeView} selected {/if}>{$type->name}</option>
                                                    {/if}
                                                {else}
                                                    {if $type->name != "Support Hours"}
                                                        <option value="{$type->name}" {if $type->view === $typeView} selected {/if}>{$type->name}</option>
                                                    {/if}        
                                                {/if}
                                            {/if}
                                            {/if}
                                        {/foreach}
                                    {/foreach}
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="item-{$parent}-{$index}-inputs-loader preloader-container is-hidden" data-menu-item-inputs-loader data-index="{$index}" data-parent="{$parent}">
                        <div class="preloader preloader--lg"></div>
                    </div>
                    <div class="item-{$parent}-{$index}-inputs row" data-menu-item-inputs data-index="{$index}" data-parent="{$parent}">
                        {include file="adminarea/menu/includes/types/{$typeView}.tpl" type=$parent translationMethod=$translationMethod}
                    </div>
                </div>    
            </div>    
        </div>    
    </div>
    <div class="inputs-container__section {if $typeView == "divider"}is-hidden{/if}" data-menu-display-settings>
        <div class="section {if $typeView == "mode-switcher" || $typeView == "support-hours"}is-hidden{/if}" data-menu-display-label>
            <div class="section__header top collapsed" data-toggle="lu-collapse" data-target="#label-{$parent}-{$index}">
                <h6 class="top__title">Menu Item Label</h6>
                <button type="button" class="top__toolbar btn btn--link">
                    <span class="btn__text">Expand</span>
                    <span class="btn__text">Hide</span>
                    <i class="btn__icon ls ls-down"></i>
                </button>
            </div>    
            <div class="section__content collapse" id="label-{$parent}-{$index}">
                <div class="well">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="form-label">
                                    Label type
                                    {if isset($tooltips.menu.menu_items.label_type)}
                                        {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.label_type}
                                    {/if}
                                </label>
                                <select class="form-control" name="items[{$parent}][{$index}][display][label_type]">
                                    <option value="default" {if isset($display['label_type']) && $display['label_type'] == 'default'}selected{/if}>Default</option>
                                    <option value="primary" {if isset($display['label_type']) && $display['label_type'] == 'primary'}selected{/if}>Primary</option>
                                    <option value="primary-faded" {if isset($display['label_type']) && $display['label_type'] == 'primary-faded'}selected{/if}>Primary Faded</option>
                                    <option value="secondary" {if isset($display['label_type']) && $display['label_type'] == 'secondary'}selected{/if}>Secondary</option>
                                    <option value="success" {if isset($display['label_type']) && $display['label_type'] == 'success'}selected{/if}>Success</option>
                                    <option value="info" {if isset($display['label_type']) && $display['label_type'] == 'info'}selected{/if}>Info</option>
                                    <option value="warning" {if isset($display['label_type']) && $display['label_type'] == 'warning'}selected{/if}>Warning</option>
                                    <option value="danger" {if isset($display['label_type']) && $display['label_type'] == 'danger'}selected{/if}>Danger</option>
                                    <option value="savings" {if isset($display['label_type']) && $display['label_type'] == 'savings'}selected{/if}>Savings</option> 
                                </select>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <div class="d-flex">
                                    <label class="form-label">
                                        Label text
                                        {if isset($tooltips.menu.menu_items.label_text)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.label_text}
                                        {/if}
                                    </label>
                                    <a class="form-label__translate label-link m-l-a" href="#translationCommonModal" data-toggle="lu-modal" data-backdrop="static" data-keyboard="false" data-index="{$index}" data-parent="{$parent}" data-title="Label" data-type="items[{$parent}][{$index}][display][label_text]" data-menu-common-translation>
                                        Translate
                                    </a>
                                </div>
                                {assign var="labelLang" value=""}
                                {if isset($display['label_text'])}
                                    {assign var="tempLabelText" value=","|explode:$display['label_text']|replace:'}':''|replace:'{':''|replace:'&quot;':''}
                                    {if is_array($tempLabelText)}
                                        {foreach $tempLabelText as $text}
                                            {assign var="labelText" value=":"|explode:$text}
                                            {if isset($labelText[0]) && isset($whmcsLang->value) && $labelText[0] == $whmcsLang->value}
                                                {if isset($labelText[1])}{$labelLang = $labelText[1]}{/if}
                                            {/if} 
                                        {/foreach}
                                    {/if}
                                {/if}
                                <input 
                                    type="text" 
                                    class="form-control" 
                                    data-menu-item-common-description
                                    data-type="items[{$parent}][{$index}][display][label_text]" 
                                    data-ajax-url="{$helper->url('Menu@getCustomTranslation',['templateName'=>$templateName])}"
                                    value="{$labelLang}"
                                >
                                <input type="hidden" name="items[{$parent}][{$index}][display][label_text]" value="{if isset($display['label_text'])}{$display['label_text']}{/if}">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {if $level == 0 && $location !== 'Footer' && $typeView != "mode-switcher" && $typeView != "support-hours"}  {* dla poziomu 0 main menu*}
           <div class="section" data-menu-display-submenu>
                <div class="section__header top collapsed" data-toggle="lu-collapse" data-target="#sub-menu-settings-{$parent}-{$index}">
                    <h6 class="top__title">Sub-Menu Settings</h6>
                    <button type="button" class="top__toolbar btn btn--link">
                        <span class="btn__text">Expand</span>
                        <span class="btn__text">Hide</span>
                        <i class="btn__icon ls ls-down"></i>
                    </button>
                </div>    
                <div class="section__content collapse" id="sub-menu-settings-{$parent}-{$index}" data-submenu-style-container>
                    <div class="well">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="form-label">
                                        Sub-menu style
                                        {if isset($tooltips.menu.menu_items.dropdown_style)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.dropdown_style}
                                        {/if}
                                    </label>
                                    <select data-submenu-style class="form-control opacity-1" name="items[{$parent}][{$index}][display][dropdown]">
                                        <option value="default" {if isset($display['dropdown']) && $display['dropdown'] == 'default'} selected {/if}>Default</option>
                                        <option value="extended" {if isset($display['dropdown']) && $display['dropdown'] == 'extended'} selected {/if}>Extended</option>
                                        <option value="mega" {if isset($display['dropdown']) && $display['dropdown'] == 'mega'} selected {/if}>Mega menu</option>
                                        {* <option value="horizontal" {if isset($display['dropdown']) && $display['dropdown'] == 'horizontal'} selected {/if}>Horizontal</option> *}
                                    </select>
                                </div>
                            </div>
                            <div data-submenu-style-content class="flex-1 {if !isset($display['dropdown']) || $display['dropdown'] != 'mega'}is-hidden{/if}">
                                {include file="adminarea/menu/includes/components/icon.tpl" type="dropdown_graphic"}
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <div class="d-flex">
                                            <label class="form-label">
                                                Sub-menu description
                                                {if isset($tooltips.menu.menu_items.dropdown_description)}
                                                    {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.dropdown_description}
                                                {/if}
                                            </label>
                                            <a class="form-label__translate label-link m-l-a" href="#translationCommonModal" data-toggle="lu-modal" data-backdrop="static" data-keyboard="false" data-index="{$index}" data-parent="{$parent}" data-title="Label" data-type="items[{$parent}][{$index}][display][dropdown_description]" data-menu-common-translation>
                                                Translate
                                            </a>
                                        </div>
                                        {$dropdownDescriptionLang = ""}
                                        {if isset($display['dropdown_description'])}
                                            {$tempDropdownDescription = $display['dropdown_description']|replace:'&quot;':'"'}
                                            {$dropdownDescription = $tempDropdownDescription|json_decode:true}
                                            {if is_array($dropdownDescription) && isset($whmcsLang->value) && isset($dropdownDescription[$whmcsLang->value])}
                                                {$dropdownDescriptionLang = $dropdownDescription[$whmcsLang->value]|unescape:'htmlall'}
                                            {/if}
                                        {/if}
                                        <textarea 
                                            type="text" 
                                            class="form-control" 
                                            data-menu-item-common-description
                                            data-type="items[{$parent}][{$index}][display][dropdown_description]" 
                                            data-ajax-url="{$helper->url('Menu@getCustomTranslation',['templateName'=>$templateName])}"
                                            value="{$dropdownDescriptionLang}"
                                        >{$dropdownDescriptionLang}</textarea>
                                        <input type="hidden" name="items[{$parent}][{$index}][display][dropdown_description]" value="{if isset($display['dropdown_description'])}{$display['dropdown_description']}{/if}">
                                    </div>
                                </div>
                            </div>    
                        </div>    
                    </div>
                </div>        
            </div>           
        {/if} 
        
        <div class="section">
             <div class="section__header top collapsed" data-toggle="lu-collapse" data-target="#item-display-settings-{$parent}-{$index}">
                <h6 class="top__title">{if $level == 1}Sub-{/if}Menu Item Display Settings</h6>
                 <button type="button" class="top__toolbar btn btn--link">
                    <span class="btn__text">Expand</span>
                    <span class="btn__text">Hide</span>
                    <i class="btn__icon ls ls-down"></i>
                </button>
            </div>
            <div class="section__content collapse" id="item-display-settings-{$parent}-{$index}">
                <div class="well">
                    <div class="item-{$parent}-{$index}-settings row">
                        {if $level == 0 && $location !== 'Footer'} {*dla poziomu 0 i dla main menu i dla secondary menu*}
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">
                                        Theme Layout
                                        {if isset($tooltips.menu.menu_items.theme_layout)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.theme_layout}
                                        {/if}
                                    </label>
                                    <select class="form-control multiselect form-control--basic opacity-1" data-menu-layout name="items[{$parent}][{$index}][display][theme-layout][]" multiple>
                                        <option value="All" {if (isset($display['theme-layout']) && !is_array($display['theme-layout']) && in_array('All', explode(',', $display['theme-layout']))) || (isset($display['theme-layout']) && is_array($display['theme-layout']) && in_array('All', $display['theme-layout'])) || !isset($display['theme-layout'])} selected {/if}>All</option>
                                        <option value="Default" {if (isset($display['theme-layout']) && !is_array($display['theme-layout']) && in_array('Default', explode(',', $display['theme-layout']))) || (isset($display['theme-layout']) && is_array($display['theme-layout']) && in_array('Default', $display['theme-layout']))} selected {/if}>Default</option>
                                        <option value="Condensed" {if (isset($display['theme-layout']) && !is_array($display['theme-layout']) && in_array('Condensed', explode(',', $display['theme-layout']))) || (isset($display['theme-layout']) && is_array($display['theme-layout']) && in_array('Condensed', $display['theme-layout']))} selected {/if}>Condensed</option>
                                        <option value="Left" {if (isset($display['theme-layout']) && !is_array($display['theme-layout']) && in_array('Left', explode(',', $display['theme-layout']))) || (isset($display['theme-layout']) && is_array($display['theme-layout']) && in_array('Left', $display['theme-layout']))} selected {/if}>Left</option>
                                    </select>
                                </div>
                            </div>
                        {/if}
                        <div class="col-md-6"> {*zawsze*}
                            <div class="form-group">
                                <label class="form-label">
                                    Client Status
                                    {if isset($tooltips.menu.menu_items.client_status)}
                                        {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.client_status}
                                    {/if}
                                </label>
                                <select class="form-control menu-item-type type-{$parent}-{$index} opacity-1" name="items[{$parent}][{$index}][display][client-status]">
                                    <option value="All" {if isset($display['client-status']) && $display['client-status'] == 'All'} selected {/if}>All</option>
                                    <option value="Logged-In" {if isset($display['client-status']) && $display['client-status'] == 'Logged-In'} selected {/if}>Logged in Client</option>
                                    <option value="Logged-Out" {if isset($display['client-status']) && $display['client-status'] == 'Logged-Out'} selected {/if}>Logged out Client</option>
                                </select>
                            </div>
                        </div>
                        {if $level == 0 && $location !== 'Footer' && $typeView != "mode-switcher" && $typeView != "support-hours"} {*dla poziomu 0 i dla main menu i dla secondary menu*}
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">
                                        Style for Top Menu Layout
                                        {if isset($tooltips.menu.menu_items.style_for_top_menu_layout)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.style_for_top_menu_layout}
                                        {/if}
                                    </label>
                                    <select class="form-control opacity-1" data-menu-style name="items[{$parent}][{$index}][display][style][top][layout]" data-parent="{$parent}" data-index="{$index}" data-style="top">
                                        <option value="text" {if isset($display['style']['top']['layout']) && $display['style']['top']['layout'] == 'text'} selected {/if}>Text only</option>
                                        <option value="icon-text" {if isset($display['style']['top']['layout']) && $display['style']['top']['layout'] == 'icon-text'} selected {/if}>Text with icon</option>
                                        <option value="icon" {if isset($display['style']['top']['layout']) && $display['style']['top']['layout'] == 'icon'} selected {/if}>Icon only</option>
                                        {if $typeView != "whmcs-notifications" && $typeView != "language"}
                                            <option value="button" {if isset($display['style']['top']['layout']) && $display['style']['top']['layout'] == 'button'} selected {/if}>Button</option>
                                        {/if}
                                    </select>
                                </div>
                                <div
                                    class="form-group {if !isset($display['style']['top']['layout']) || $display['style']['top']['layout'] !== 'button' }is-hidden{/if}"
                                    data-menu-button-style="top"
                                    data-parent="{$parent}"
                                    data-index="{$index}"
                                >
                                    <label class="form-label">
                                        Button Style for Top Menu Layout
                                        {if isset($tooltips.menu.menu_items.button_style_for_top_menu_layout)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.button_style_for_top_menu_layout}
                                        {/if}
                                    </label>
                                    <select class="form-control opacity-1" name="items[{$parent}][{$index}][display][style][top][button-style]">
                                        <option value="primary" {if isset($display['style']['top']['button-style']) && $display['style']['top']['button-style'] == 'primary'} selected {/if}>Primary</option>
                                        <option value="secondary" {if isset($display['style']['top']['button-style']) && $display['style']['top']['button-style'] == 'secondary'} selected {/if}>Secondary</option>
                                        <option value="primary-faded" {if isset($display['style']['top']['button-style']) && $display['style']['top']['button-style'] == 'primary-faded'} selected {/if}>Primary Faded</option>
                                        <option value="outline" {if isset($display['style']['top']['button-style']) && $display['style']['top']['button-style'] == 'outline'} selected {/if}>Outline</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">
                                        Style for Left Menu Layout
                                        {if isset($tooltips.menu.menu_items.style_for_left_menu_layout)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.style_for_left_menu_layout}
                                        {/if}
                                    </label>
                                    <select class="form-control opacity-1" data-menu-style name="items[{$parent}][{$index}][display][style][left][layout]" data-parent="{$parent}" data-index="{$index}" data-style="left">
                                        <option value="text" {if isset($display['style']['left']['layout']) && $display['style']['left']['layout'] == 'text'} selected {/if}>Text only</option>
                                        <option value="icon-text" {if (isset($display['style']['left']['layout']) && $display['style']['left']['layout'] == 'icon-text') || (isset($display['style']['left']['layout']) && !$display['style']['left']['layout'])} selected {/if}>Text with icon</option>
                                        <option value="icon" {if isset($display['style']['left']['layout']) && $display['style']['left']['layout'] == 'icon'} selected {/if}>Icon only</option>
                                        {if $typeView != "whmcs-notifications" && $typeView != "language"}
                                            <option value="button" {if isset($display['style']['left']['layout']) && $display['style']['left']['layout'] == 'button'} selected {/if}>Button</option>
                                        {/if}
                                    </select>
                                </div>
                                <div
                                    class="form-group {if !isset($display['style']['left']['layout']) || $display['style']['left']['layout'] !== 'button' }is-hidden{/if}"
                                    data-menu-button-style="left"
                                    data-parent="{$parent}"
                                    data-index="{$index}"
                                >
                                    <label class="form-label">
                                        Button Style for Left Menu Layout
                                        {if isset($tooltips.menu.menu_items.button_style_for_left_menu_layout)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.button_style_for_left_menu_layout}
                                        {/if}
                                    </label>
                                    <select class="form-control opacity-1" name="items[{$parent}][{$index}][display][style][left][button-style]">
                                        <option value="primary" {if isset($display['style']['left']['button-style']) && $display['style']['left']['button-style'] == 'primary'} selected {/if}>Primary</option>
                                        <option value="secondary" {if isset($display['style']['left']['button-style']) && $display['style']['left']['button-style'] == 'secondary'} selected {/if}>Secondary</option>
                                        <option value="primary-faded" {if isset($display['style']['left']['button-style']) && $display['style']['left']['button-style'] == 'primary-faded'} selected {/if}>Primary Faded</option>
                                        <option value="outline" {if isset($display['style']['left']['button-style']) && $display['style']['left']['button-style'] == 'outline'} selected {/if}>Outline</option>
                                    </select>
                                </div>
                            </div>
                        {/if}
                        {if $level == 0 && $location == 'Main Menu'} {*dla poziomu 0 i dla main menu*}
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">
                                        Position
                                        {if isset($tooltips.menu.menu_items.position)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.position}
                                        {/if}
                                    </label>
                                    <select class="form-control opacity-1" name="items[{$parent}][{$index}][display][position]" data-menu-change-position>
                                        <option value="left" {if isset($display['position']) && $display['position'] == 'left'} selected {/if}>Left</option>
                                        <option value="right" {if isset($display['position']) && $display['position'] == 'right'} selected {/if}>Right</option>
                                    </select>
                                </div>
                            </div>
                        {/if}
                        
                        {if $level == 1 || ($level == 0 && $location == 'Footer')} {* dla poziomu 1*}
                            <div class="col-md-6 {if $typeView == "header" || $typeView == "header-collapse"}is-hidden{/if}" data-menu-item-style>
                                <div class="form-group">
                                    <label class="form-label">
                                        Style
                                        {if isset($tooltips.menu.menu_items.style)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.style}
                                        {/if}
                                    </label>
                                    
                                    <select class="form-control opacity-1" name="items[{$parent}][{$index}][display][style][layout]">
                                        <option value="icon-text" {if isset($display['style']['layout']) && $display['style']['layout'] == 'icon-text'} selected {/if}>Text with icon</option>
                                        <option value="text" {if (isset($display['style']['layout']) && $display['style']['layout'] == 'text') || (isset($display['style']['layout']) && !$display['style']['layout'] && $location == 'Footer' && $level == 0)} selected{/if}>Text</option>
                                        <option value="icon" {if isset($display['style']['layout']) && $display['style']['layout'] == 'icon'} selected {/if}>Icon only</option>
                                    </select>
                                </div>
                            </div>
                        {/if}
                        {if $level == 0 && $location === 'Footer'} {* tylko dla footera dla poziomu 0*}
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">
                                        Footer Position
                                        {if isset($tooltips.menu.menu_items.footer_position)}
                                            {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.footer_position}
                                        {/if}
                                    </label>
                                    <select class="form-control opacity-1" name="items[{$parent}][{$index}][display][footer-position]" data-menu-change-position data-menu-footer-position>
                                        <option value="Primary" {if isset($display['footer-position']) && $display['footer-position'] === 'Primary'}selected{/if}>Primary</option>
                                        <option value="Secondary" {if isset($display['footer-position']) && $display['footer-position'] === 'Secondary'}selected{/if}>Secondary</option>
                                        <option value="Social" {if isset($display['footer-position']) && $display['footer-position'] === 'Social'}selected{/if}>Social</option>
                                    </select>
                                </div>
                            </div>
                        {/if}
                        <div class="{if $level == 1}col-md-12{else}col-md-6{/if} {if $typeView == "predefined-list"}is-hidden{/if}" data-menu-custom-classes>
                            <div class="form-group">
                                <label class="form-label">
                                    Custom Classes
                                    {if isset($tooltips.menu.menu_items.custom_classes)}
                                        {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.custom_classes}
                                    {/if}
                                </label>
                                <input type="text" class="form-control" name="items[{$parent}][{$index}][display][custom-data-classes]" value="{if isset($display['custom-data-classes'])}{$display['custom-data-classes']}{/if}">
                            </div>
                        </div>
                        <div class="col-md-12 {if $typeView == "predefined-list" || $typeView == "header" || $typeView == "header-collapse" || $typeView == "mode-switcher" || $typeView == "support-hours"}is-hidden{/if}" data-menu-target-blank>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group d-flex">
                                        <label class="form-label text-default form-text m-b-0x">
                                            Target Blank
                                            {if isset($tooltips.menu.menu_items.target_blank)}
                                                {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.target_blank}
                                            {/if}
                                        </label>
                                        <label class="switch switch--primary m-l-0x">
                                            <input type="hidden" name="items[{$parent}][{$index}][display][target]" value="0">
                                            <input class="switch__checkbox mode-display" name="items[{$parent}][{$index}][display][target]" value="1" type="checkbox" {if isset($display['target']) && $display['target']}checked="checked"{/if}>
                                            <span class="switch__container"><span class="switch__handle"></span></span>
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group d-flex">
                                        <label class="form-label text-default form-text m-b-0x">
                                            Add "Noopener" Attribute
                                            {if isset($tooltips.menu.menu_items.noopener)}
                                                {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.noopener}
                                            {/if}
                                        </label>
                                        <label class="switch switch--primary m-l-0x">
                                            <input type="hidden" name="items[{$parent}][{$index}][display][noopener]" value="0">
                                            <input class="switch__checkbox mode-display" name="items[{$parent}][{$index}][display][noopener]" value="1" type="checkbox" {if isset($display['noopener']) && $display['noopener']}checked="checked"{/if}>
                                            <span class="switch__container"><span class="switch__handle"></span></span>
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group d-flex">
                                        <label class="form-label text-default form-text">
                                            Add "Noreferrer" Attribute
                                            {if isset($tooltips.menu.menu_items.noreferrer)}
                                                {include file="adminarea/includes/helpers/tooltip.tpl" tooltip=$tooltips.menu.menu_items.noreferrer}
                                            {/if}
                                        </label>
                                        <label class="switch switch--primary m-l-0x">
                                            <input type="hidden" name="items[{$parent}][{$index}][display][noreferrer]" value="0">
                                            <input class="switch__checkbox mode-display" name="items[{$parent}][{$index}][display][noreferrer]" value="1" type="checkbox" {if isset($display['noreferrer']) && $display['noreferrer']}checked="checked"{/if}>
                                            <span class="switch__container"><span class="switch__handle"></span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>    
        </div>        
    </div>
</div>
<div class="item-{$parent}-{$index}-hidden-inputs">
    <input type="hidden" class="{if $level == 0}parent-order{elseif $level == 1}child-order{/if}" name="items[{$parent}][{$index}][order]" value="{$order}" data-item-order>
    <input type="hidden" class="item-level" name="items[{$parent}][{$index}][level]" value="{$level}">
    <input type="hidden" class="item-parent" name="items[{$parent}][{$index}][parent]" value={$parent}>
</div>