//
//  BetType.swift
//  Blackjack
//
//  Available betting options in Blackjack.
//

import Foundation

/// Types of bets available in Blackjack.
enum BetType: String, CaseIterable, Identifiable {
    case main = "main"
    case insurance = "insurance"
    case doubleDown = "double"
    case split = "split"
    
    var id: String { rawValue }
    
    var displayName: String {
        switch self {
        case .main: return String(localized: "Main Bet")
        case .insurance: return String(localized: "Insurance")
        case .doubleDown: return String(localized: "Double Down")
        case .split: return String(localized: "Split")
        }
    }
    
    var payoutMultiplier: Double {
        switch self {
        case .main: return 1.0          // 1:1
        case .insurance: return 2.0      // 2:1
        case .doubleDown: return 1.0     // 1:1 on doubled bet
        case .split: return 1.0          // 1:1 per hand
        }
    }
    
    var blackjackPayout: Double {
        1.5  // 3:2 for blackjack
    }
}

