import SwiftUI

/// 统一图标组件 — 所有自定义图标在此管理
enum ZhiXiIcon: String {
    // Tab 图标（双色：默认态 + 激活态）
    case tabLearn = "tab-learn"
    case tabLearnActive = "tab-learn-active"
    case tabLibrary = "tab-library"
    case tabLibraryActive = "tab-library-active"
    case tabAnalysis = "tab-analysis"
    case tabAnalysisActive = "tab-analysis-active"
    case tabProfile = "tab-profile"
    case tabProfileActive = "tab-profile-active"
    // 页面内图标（单色 Template）
    case iconSettings = "icon-settings"
    case iconNotifications = "icon-notifications"
    case iconSearch = "icon-search"

    var image: Image { Image(rawValue) }
}

extension Image {
    static func zxIcon(_ icon: ZhiXiIcon) -> Image {
        icon.image.renderingMode(.template)
    }
}
