//
//  TableLimits.swift
//  CasinoKit
//
//  Preset table limits for casino games.
//

import Foundation

/// Preset table limits for betting.
public enum TableLimits: String, CaseIterable, Identifiable, Sendable {
    case casual = "casual"
    case low = "low"
    case medium = "medium"
    case high = "high"
    case vip = "vip"
    
    public var id: String { rawValue }
    
    /// Display name for the limit tier.
    public var displayName: String {
        switch self {
        case .casual: return String(localized: "Casual", bundle: .module)
        case .low: return String(localized: "Low Stakes", bundle: .module)
        case .medium: return String(localized: "Medium Stakes", bundle: .module)
        case .high: return String(localized: "High Stakes", bundle: .module)
        case .vip: return String(localized: "VIP", bundle: .module)
        }
    }
    
    /// Minimum bet for this limit tier.
    public var minBet: Int {
        switch self {
        case .casual: return 5
        case .low: return 10
        case .medium: return 25
        case .high: return 100
        case .vip: return 500
        }
    }
    
    /// Maximum bet for this limit tier.
    public var maxBet: Int {
        switch self {
        case .casual: return 500
        case .low: return 1_000
        case .medium: return 5_000
        case .high: return 10_000
        case .vip: return 50_000
        }
    }
    
    /// Short description showing the bet range.
    public var description: String {
        "$\(minBet) - $\(maxBet.formatted())"
    }
    
    /// Detailed description of the limit tier.
    public var detailedDescription: String {
        switch self {
        case .casual: return String(localized: "Perfect for learning", bundle: .module)
        case .low: return String(localized: "Standard mini table", bundle: .module)
        case .medium: return String(localized: "Regular casino table", bundle: .module)
        case .high: return String(localized: "High roller table", bundle: .module)
        case .vip: return String(localized: "Exclusive VIP room", bundle: .module)
        }
    }
}

