import SwiftUI

enum FeatureItem: String, CaseIterable, Identifiable {
    case audioDevice
    case videoDevice
    case videoUnderstand
    case phoneCall
    case settings

    var id: String { rawValue }

    var title: String {
        switch self {
        case .audioDevice:     return "音频设备API"
        case .videoDevice:     return "视频设备API"
        case .videoUnderstand: return "视频理解"
        case .phoneCall:       return "打电话"
        case .settings:        return "设置"
        }
    }

    var icon: String {
        switch self {
        case .audioDevice:     return "mic.fill"
        case .videoDevice:     return "video.fill"
        case .videoUnderstand: return "eye.fill"
        case .phoneCall:       return "phone.fill"
        case .settings:        return "gearshape"
        }
    }

    var description: String {
        switch self {
        case .audioDevice:     return "音频采集与播放控制"
        case .videoDevice:     return "视频采集与渲染控制"
        case .videoUnderstand: return "实时画面 AI 理解"
        case .phoneCall:       return "实时音视频通话"
        case .settings:        return "应用配置与偏好"
        }
    }

    var color: Color {
        switch self {
        case .audioDevice:     return .blue
        case .videoDevice:     return .purple
        case .videoUnderstand: return .pink
        case .phoneCall:       return .teal
        case .settings:        return .gray
        }
    }

    static var mainItems: [FeatureItem] {
        [.audioDevice, .videoDevice, .videoUnderstand, .phoneCall]
    }
}
