<?php /*a:1:{s:66:"D:\phpstudy\WWW\12xz\app\index\view/default\public\header_nav.html";i:1782629701;}*/ ?>
<?php if(MyC('home_main_header_status', 1) == 1): ?>
    <header class="am-topbar shop-navigation">
        <div class="am-container">
            <!-- 中间导航左侧 -->
            <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
                <div class="plugins-tag">
                    <span>plugins_view_common_header_nav_left</span>
                </div>
            <?php endif; 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)): ?>
                        <?php echo $hook; ?>
                    <?php endif; ?>
                <?php endforeach; ?>
            <?php endif; ?>

            <!-- 手机端导航伸展按钮 -->
            <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="<?php echo MyUrl('index/category/index'); ?>" class="am-show-md-only">
                <div class="goods-category-title am-hide-sm-only">
                    <span class="all-goods"><?php echo 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="<?php echo 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="<?php echo MyLang('common.search_input_placeholder'); ?>" value="<?php if(!empty($params['wd'])): ?><?php echo htmlentities((string) $params['wd']); ?><?php endif; ?>" 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>

                <!-- 中间导航搜索内部 -->
                <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
                    <div class="plugins-tag">
                        <span>plugins_view_common_header_nav_search_inside</span>
                    </div>
                <?php endif; 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)): ?>
                            <?php echo $hook; ?>
                        <?php endif; ?>
                    <?php endforeach; ?>
                <?php endif; ?>
            </form>

            <div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
                <!-- 中间导航内容内部顶部 -->
                <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
                    <div class="plugins-tag">
                        <span>plugins_view_common_header_nav_content_inside_top</span>
                    </div>
                <?php endif; 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)): ?>
                            <?php echo $hook; ?>
                        <?php endif; ?>
                    <?php endforeach; ?>
                <?php endif; if(empty($user)): ?>
                    <!-- 未登录操作栏 -->
                    <div class="navigation-button am-show-sm-only">
                        <?php if(!empty($home_user_login_type)): ?>
                            <a href="<?php echo MyUrl('index/user/logininfo'); ?>" class="am-btn am-btn-primary am-topbar-btn am-btn-sm"><?php echo MyLang('common.login_title'); ?></a>
                        <?php endif; if(!empty($home_user_reg_type)): ?>
                            <a href="<?php echo MyUrl('index/user/reginfo'); ?>" class="am-btn am-btn-warning am-topbar-btn am-btn-sm"><?php echo MyLang('common.register_title'); ?></a>
                        <?php endif; ?>
                    </div>
                <?php endif; ?>

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

                <!-- 中间导航内容内部底部 -->
                <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
                    <div class="plugins-tag">
                        <span>plugins_view_common_header_nav_content_inside_bottom</span>
                    </div>
                <?php endif; 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)): ?>
                            <?php echo $hook; ?>
                        <?php endif; ?>
                    <?php endforeach; ?>
                <?php endif; ?>
            </div>

            <!-- 中间导航右侧 -->
            <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
                <div class="plugins-tag">
                    <span>plugins_view_common_header_nav_right</span>
                </div>
            <?php endif; 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)): ?>
                        <?php echo $hook; ?>
                    <?php endif; ?>
                <?php endforeach; ?>
            <?php endif; ?>
        </div>
    </header>
<?php endif; ?>