<?php /*a:1:{s:59:"D:\phpstudy\WWW\12xz\app\admin\view/default\public\nav.html";i:1782629701;}*/ ?>
<header class="am-topbar am-topbar-inverse admin-header">
    <!-- logo/名称信息 -->
    <?php if(!empty($admin_logo)): ?>
        <a href="<?php echo MyUrl('admin/index/index'); ?>" class="nav-logo am-fl am-block am-nbfc am-show-sm-only">
            <img src="<?php echo htmlentities((string) $admin_logo); ?>" class="am-fl" />
            <span class="admin-site-vice-name am-fl am-margin-left-xs"><?php echo MyLang('common.admin_browser_title'); ?></span>
        </a>
    <?php endif; ?>

    <div class="header-top">
        <!-- 手机模式下导航按钮 -->
        <button
            class="am-topbar-btn am-topbar-toggle am-btn am-btn-xs am-btn-primary am-show-sm-only am-radius header-nav-submit"
            data-am-collapse="{target: '#topbar-collapse'}">
            <span class="am-sr-only"><?php echo MyLang('toggle_navigation_title'); ?></span>
            <i class="am-icon-bars"></i>
        </button>
        <!-- 右侧内容 -->
        <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
            <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-right-list">
                <!-- 语言切换 -->
                <?php if(!empty($multilingual_data) and !empty($multilingual_data['data']) and !empty($multilingual_data['default']) and is_array($multilingual_data['data']) and is_array($multilingual_data['default'])): ?>
                    <li class="am-dropdown" data-am-dropdown="{trigger: 'hover'}" data-am-dropdown-toggle>
                        <a class="am-dropdown-toggle am-flex am-flex-row am-flex-items-center am-gap-12" href="javascript:;">
                            <i class="iconfont icon-language"></i>
                            <span class="am-show-sm-only"><?php echo MyLang('lang_title'); ?>[<?php echo htmlentities((string) $multilingual_data['default']['name']); ?>]</span>
                        </a>
                        <ul class="am-dropdown-content am-radius-lg">
                            <?php foreach($multilingual_data['data'] as $v): ?>
                                <li <?php if($multilingual_default_code == $v['code']): ?>class="am-active"<?php endif; ?>>
                                    <a href="<?php echo htmlentities((string) $v['url']); ?>">
                                        <?php if(!empty($v['icon'])): ?>
                                            <img src="<?php echo htmlentities((string) $v['icon']); ?>" alt="<?php echo htmlentities((string) $v['name']); ?>" class="am-radius am-vertical-align-middle am-margin-right-xs" width="14" height="14" />
                                        <?php endif; ?>
                                        <span class="am-vertical-align-middle"><?php echo htmlentities((string) $v['name']); ?></span>
                                    </a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    </li>
                <?php endif; ?>

                <!-- 主题配色切换 -->
                <?php if(!empty($theme_color_choice_data) and !empty($theme_color_choice_data['data']) and !empty($theme_color_choice_data['theme']) and !empty($theme_color_choice_data['value'])): ?>
                    <li class="am-dropdown" data-am-dropdown="{trigger: 'hover'}" data-am-dropdown-toggle>
                        <a class="am-dropdown-toggle am-flex am-flex-row am-flex-items-center am-gap-12" href="javascript:;">
                            <i class="iconfont icon-theme"></i>
                            <span class="am-show-sm-only"><?php echo MyLang('color_matching_title'); ?>[<?php echo htmlentities((string) $theme_color_choice_data['theme']); ?>]</span>
                        </a>
                        <ul class="am-dropdown-content am-radius-lg">
                            <?php foreach($theme_color_choice_data['data'] as $v): ?>
                                <li <?php if($theme_color_choice_data['value'] == $v['value']): ?>class="am-active"<?php endif; ?>>
                                    <a href="<?php echo htmlentities((string) $v['url']); ?>">
                                        <i class="am-inline-block am-padding-xs am-circle" style="background: <?php echo htmlentities((string) $v['color']); ?>;"></i>
                                        <span class="am-margin-left-xs"><?php echo htmlentities((string) $v['name']); ?></span>
                                    </a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    </li>
                <?php endif; ?>

                <!-- 清除缓存 -->
                <?php if(AdminIsPower('cache', 'statusupdate')): ?>
                    <li class="am-dropdown">
                        <a href="javascript:;" class="clear-cache-html submit-ajax am-flex am-flex-row am-flex-items-center am-gap-12" data-url="<?php echo MyUrl('admin/cache/statusupdate'); ?>" data-is-confirm="0" data-is-loading="1"  data-am-popover="{content: '<?php echo MyLang('common.remove_cache_title'); ?>', trigger: 'hover focus', theme: 'sm'}">
                            <i class="iconfont icon-clear"></i>
                            <span class="am-show-sm-only"><?php echo MyLang('common.remove_cache_title'); ?></span>
                        </a>
                    </li>
                <?php endif; ?>

                <!-- 全屏 -->
                <li class="am-dropdown">
                    <a href="javascript:;" class="fullscreen-event am-flex am-flex-row am-flex-items-center am-gap-12" data-fulltext-open="<?php echo MyLang('fullscreen_open_title'); ?>" data-fulltext-exit="<?php echo MyLang('fullscreen_exit_title'); ?>" data-am-popover="{content: '<?php echo MyLang('fullscreen_open_title'); ?>', trigger: 'hover focus', theme: 'sm'}">
                        <i class="iconfont icon-full-screen"></i>
                        <span class="fullscreen-text am-show-sm-only"><?php echo MyLang('fullscreen_open_title'); ?></span>
                    </a>
                </li>

                <!-- 首页 -->
                <li class="am-dropdown">
                    <a href="<?php echo htmlentities((string) $home_url); ?>" class="am-flex am-flex-row am-flex-items-center am-gap-12" target="_blank" rel="noopener noreferrer" data-am-popover="{content: '<?php echo MyLang('shop_home_title'); ?>', trigger: 'hover focus', theme: 'sm'}">
                        <i class="iconfont icon-home"></i>
                        <span class="am-show-sm-only"><?php echo MyLang('shop_home_title'); ?></span>
                    </a>
                </li>

                <!-- 公告 + 待处理（同一铃铛下拉） -->
                <?php if(!empty($admin) and (!empty($admin_notice) or !empty($admin_nav_pending_todo))): ?>
                    <li class="am-dropdown admin-nav-pending-todo" data-am-dropdown="{trigger: 'hover'}">
                        <a href="javascript:;" class="am-dropdown-toggle am-flex am-flex-row am-flex-items-center am-gap-12">
                            <i class="iconfont icon-smallbell"></i>
                            <span class="am-show-sm-only"><?php echo MyLang('notice_title'); ?></span>
                            <?php if(!empty($admin_nav_pending_todo['has_pending'])): ?>
                                <i class="hot-dot am-color-red">.</i>
                            <?php endif; ?>
                        </a>
                        <div class="am-dropdown-content am-radius-lg am-color-333 admin-nav-pending-todo-panel">
                            <?php if(!empty($admin_notice)): ?>
                                <div class="admin-nav-pending-todo-notice-block notice-width">
                                    <div class="am-color-yellow notice-content admin-nav-pending-todo-notice-body"><?php echo $admin_notice; ?></div>
                                </div>
                            <?php endif; if(!empty($admin_notice)): ?>
                                <hr data-am-widget="divider" class="am-divider am-divider-default am-margin-bottom-xs am-margin-top-sm" />
                            <?php endif; if(!empty($admin_nav_pending_todo['data']) and is_array($admin_nav_pending_todo['data'])): ?>
                                <ul class="am-list am-list-static am-margin-bottom-0 am-scrollable-vertical admin-nav-pending-todo-list">
                                    <?php foreach($admin_nav_pending_todo['data'] as $v): if(!empty($v['name']) and !empty($v['url'])): ?>
                                            <li>
                                                <a href="javascript:;" class="submit-popup am-nbfc am-block am-radius" data-url="<?php echo htmlentities((string) $v['url']); ?>" data-title="<?php if(empty($v['title'])): ?><?php echo htmlentities((string) $v['name']); else: ?><?php echo htmlentities((string) $v['title']); ?><?php endif; ?>" data-offcanvas="right">
                                                    <span class="am-fl"><?php echo htmlentities((string) $v['name']); ?></span>
                                                    <span class="am-fr am-badge am-badge<?php if(isset($v['count']) and $v['count'] > 0): ?>-danger<?php else: ?>-secondary<?php endif; ?> am-round"><?php if(isset($v['count'])): ?><?php echo htmlentities((string) $v['count']); else: ?>0<?php endif; ?></span>
                                                </a>
                                            </li>
                                        <?php endif; ?>
                                    <?php endforeach; ?>
                                </ul>
                            <?php else: ?>
                                <p class="am-text-center am-color-grey am-padding-top-sm am-padding-bottom-xs"><?php echo MyLang('common.nav_pending_todo_empty'); ?></p>
                            <?php endif; ?>
                        </div>
                    </li>
                <?php endif; ?>

                <!-- 管理员设置 -->
                <li class="am-dropdown" data-am-dropdown="{trigger: 'hover'}" data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle" href="javascript:;">
                        <?php if(!empty($admin['avatar'])): ?>
                            <img src="<?php echo htmlentities((string) $admin['avatar']); ?>" class="am-img-thumbnail am-circle am-vertical-align-middle" width="30" height="30" />
                        <?php endif; ?>
                        <span class="am-vertical-align-middle"><?php echo htmlentities((string) $admin['username']); ?></span>
                    </a>
                    <ul class="am-dropdown-content am-radius-lg">
                        <li>
                            <a href="javascript:;" class="new-window" data-type="nav" data-url="<?php echo MyUrl('admin/admin/saveinfo', ['id'=>$admin['id'], 'is_setup'=>1]); ?>" data-node-name="<?php echo MyLang('setup_title'); ?>">
                                <i class="iconfont icon-setup"></i>
                                <span><?php echo MyLang('setup_title'); ?></span>
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo MyUrl('admin/admin/logout'); ?>">
                                <i class="iconfont icon-logout"></i>
                                <span><?php echo MyLang('quit_title'); ?></span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <div class="tabs-list">
        <!-- 快捷导航 -->
        <div class="am-text-nowrap am-scrollable-horizontal header-menu-open-pages-list tabs-switch-horizontal-container">
            <ul></ul>
        </div>
        <div class="tabs-tool am-dropdown am-hide-sm-only am-hide" data-am-dropdown>
            <a class="am-dropdown-toggle" href="javascript:;" data-am-dropdown-toggle>
                <span class="iconfont icon-nav-tools scaleanimation"></span>
            </a>
            <ul class="am-dropdown-content am-radius-lg">
                <li>
                    <a href="javascript:;" data-key="nav-refresh">
                        <i class="iconfont icon-refresh-single am-color-666"></i>
                        <span><?php echo MyLang('refresh_title'); ?></span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;" data-key="nav-close">
                        <i class="iconfont icon-close-line-dot am-color-666"></i>
                        <span><?php echo MyLang('close_title'); ?></span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;" data-key="nav-close-other">
                        <i class="iconfont icon-close-round am-color-666"></i>
                        <span><?php echo MyLang('close_other_title'); ?></span>
                    </a>
                </li>
                <li>
                    <a href="javascript:;" data-key="nav-close-all">
                        <i class="iconfont icon-logout-round am-color-666"></i>
                        <span><?php echo MyLang('close_all_title'); ?></span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</header>