{{if MyC('home_main_header_status', 1) eq 1}}
    <header class="am-topbar shop-navigation">
        <div class="am-container">
            <!-- 中间导航左侧 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_common_header_nav_left</span>
                </div>
            {{/if}}
            {{if !empty($plugins_view_common_header_nav_left_data) and is_array($plugins_view_common_header_nav_left_data)}}
                {{foreach $plugins_view_common_header_nav_left_data as $hook}}
                    {{if is_string($hook) or is_int($hook)}}
                        {{$hook|raw}}
                    {{/if}}
                {{/foreach}}
            {{/if}}

            <!-- 手机端导航伸展按钮 -->
            <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-default am-show-sm-only switch-submit" data-am-collapse="{target: '#doc-topbar-collapse'}">
                <span class="iconfont icon-more-phone"></span>
            </button>

            <!-- 全部分类 -->
            <a href="{{:MyUrl('index/category/index')}}" class="am-show-md-only">
                <div class="goods-category-title am-hide-sm-only">
                    <span class="all-goods">{{:MyLang('common.all_category_text')}}</span>
                </div>
            </a>

            <!-- 手机端搜索 -->
            <form class="am-topbar-form am-topbar-left am-form-inline am-show-sm-only navigation-search" role="search" action="{{:MyUrl('index/search/index')}}" method="POST">
                <div class="am-input-group am-input-group-sm">
                    <input type="text" name="wd" class="am-form-field" placeholder="{{:MyLang('common.search_input_placeholder')}}" value="{{if !empty($params['wd'])}}{{$params.wd}}{{/if}}" autocomplete="off" data-is-clearout="0" />
                    <span class="am-input-group-btn">
                        <button class="am-btn am-btn-default" type="submit">
                            <span class="am-icon-search am-icon-xs"></span>
                        </button>
                    </span>
                </div>

                <!-- 中间导航搜索内部 -->
                {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                    <div class="plugins-tag">
                        <span>plugins_view_common_header_nav_search_inside</span>
                    </div>
                {{/if}}
                {{if !empty($plugins_view_common_header_nav_search_inside_data) and is_array($plugins_view_common_header_nav_search_inside_data)}}
                    {{foreach $plugins_view_common_header_nav_search_inside_data as $hook}}
                        {{if is_string($hook) or is_int($hook)}}
                            {{$hook|raw}}
                        {{/if}}
                    {{/foreach}}
                {{/if}}
            </form>

            <div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
                <!-- 中间导航内容内部顶部 -->
                {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                    <div class="plugins-tag">
                        <span>plugins_view_common_header_nav_content_inside_top</span>
                    </div>
                {{/if}}
                {{if !empty($plugins_view_common_header_nav_content_inside_top_data) and is_array($plugins_view_common_header_nav_content_inside_top_data)}}
                    {{foreach $plugins_view_common_header_nav_content_inside_top_data as $hook}}
                        {{if is_string($hook) or is_int($hook)}}
                            {{$hook|raw}}
                        {{/if}}
                    {{/foreach}}
                {{/if}}

                {{if empty($user)}}
                    <!-- 未登录操作栏 -->
                    <div class="navigation-button am-show-sm-only">
                        {{if !empty($home_user_login_type)}}
                            <a href="{{:MyUrl('index/user/logininfo')}}" class="am-btn am-btn-primary am-topbar-btn am-btn-sm">{{:MyLang('common.login_title')}}</a>
                        {{/if}}
                        {{if !empty($home_user_reg_type)}}
                            <a href="{{:MyUrl('index/user/reginfo')}}" class="am-btn am-btn-warning am-topbar-btn am-btn-sm">{{:MyLang('common.register_title')}}</a>
                        {{/if}}
                    </div>
                {{/if}}

                <!-- 主导航 -->
                {{if !empty($nav_header)}}
                    <ul class="am-nav am-nav-pills am-topbar-nav theme-data-edit-event" data-module="navigation_header">
                        {{foreach $nav_header as $nav}}
                            {{if empty($nav['items'])}}
                                <li>
                                    <a href="{{$nav.url}}" {{if $nav['is_new_window_open'] eq 1}}target="_blank"{{/if}} {{if isset($nav['active']) and $nav['active'] eq 1}}class="active"{{/if}}>{{$nav.name}}</a>
                                </li>
                            {{else /}}
                                <li class="am-dropdown" data-am-dropdown>
                                    <a class="am-dropdown-toggle {{if isset($nav['active']) and $nav['active'] eq 1}}active{{/if}}" data-am-dropdown-toggle href="javascript:;">
                                        {{$nav.name}} <span class="am-icon-caret-down"></span>
                                    </a>
                                    <ul class="am-dropdown-content am-radius">
                                        {{foreach $nav.items as $navs}}
                                            <li>
                                                <a href="{{$navs.url}}" {{if isset($navs['active']) and $navs['active'] eq 1}}class="active"{{/if}}>{{$navs.name}}</a>
                                            </li>
                                        {{/foreach}}
                                    </ul>
                                </li>
                            {{/if}}
                        {{/foreach}}
                    </ul>
                {{/if}}

                <!-- 中间导航内容内部底部 -->
                {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                    <div class="plugins-tag">
                        <span>plugins_view_common_header_nav_content_inside_bottom</span>
                    </div>
                {{/if}}
                {{if !empty($plugins_view_common_header_nav_content_inside_bottom_data) and is_array($plugins_view_common_header_nav_content_inside_bottom_data)}}
                    {{foreach $plugins_view_common_header_nav_content_inside_bottom_data as $hook}}
                        {{if is_string($hook) or is_int($hook)}}
                            {{$hook|raw}}
                        {{/if}}
                    {{/foreach}}
                {{/if}}
            </div>

            <!-- 中间导航右侧 -->
            {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_common_header_nav_right</span>
                </div>
            {{/if}}
            {{if !empty($plugins_view_common_header_nav_right_data) and is_array($plugins_view_common_header_nav_right_data)}}
                {{foreach $plugins_view_common_header_nav_right_data as $hook}}
                    {{if is_string($hook) or is_int($hook)}}
                        {{$hook|raw}}
                    {{/if}}
                {{/foreach}}
            {{/if}}
        </div>
    </header>
{{/if}}