import Foundation

/// Tab model for the main tab bar — shared by MainTabView and RosettaTabBar.
enum RosettaTab: String, CaseIterable, Sendable {
    case chats, calls, settings

    static let interactionOrder: [RosettaTab] = [.calls, .chats, .settings]

    var label: String {
        switch self {
        case .chats: return "Chats"
        case .calls: return "Calls"
        case .settings: return "Settings"
        }
    }

    var animationName: String {
        switch self {
        case .chats: return "TabChats"
        case .calls: return "TabCalls"
        case .settings: return "TabSettings"
        }
    }

    var icon: String {
        switch self {
        case .chats: return "bubble.left.and.bubble.right"
        case .calls: return "phone"
        case .settings: return "gearshape"
        }
    }

    var selectedIcon: String {
        switch self {
        case .chats: return "bubble.left.and.bubble.right.fill"
        case .calls: return "phone.fill"
        case .settings: return "gearshape.fill"
        }
    }

    var interactionIndex: Int {
        Self.interactionOrder.firstIndex(of: self) ?? 0
    }
}

struct TabBadge { let tab: RosettaTab; let text: String }
