<?php
/**
 * HuSNS - 移动端页脚导航公共组件
 */
?>
<nav class="app-tabbar">
    <a href="<?php echo $this->url('mobile'); ?>" class="app-tabbar-item <?php echo $currentPage === 'home' ? 'active' : ''; ?>">
        <svg class="app-tabbar-icon" width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
            <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
        </svg>
        <span class="app-tabbar-label">首页</span>
    </a>
    <a href="<?php echo $this->url('mobile/discover'); ?>" class="app-tabbar-item <?php echo $currentPage === 'discover' ? 'active' : ''; ?>">
        <svg class="app-tabbar-icon" width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
            <path d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"/>
        </svg>
        <span class="app-tabbar-label">发现</span>
    </a>
    <a href="javascript:void(0)" class="app-tabbar-item app-tabbar-publish" onclick="handlePublishClick()">
        <span class="app-tabbar-icon-publish"></span>
    </a>
    <a href="javascript:void(0)" class="app-tabbar-item <?php echo $currentPage === 'notification' ? 'active' : ''; ?>" onclick="handleNotificationClick()">
        <svg class="app-tabbar-icon" width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
            <path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/>
        </svg>
        <span class="app-tabbar-label">消息</span>
        <span class="unread-badge" id="messageBadge" style="display:none;">0</span>
    </a>
    <a href="javascript:void(0)" class="app-tabbar-item <?php echo $currentPage === 'profile' ? 'active' : ''; ?>" onclick="handleProfileClick()">
        <svg class="app-tabbar-icon" width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
            <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
        </svg>
        <span class="app-tabbar-label">我的</span>
    </a>
</nav>