//
//  CameraFlashMode.swift
//  CameraTester
//
//  Created by Matt Bruce on 1/3/26.
//

import Foundation
import MijickCamera

/// Camera flash mode options matching MijickCamera's CameraFlashMode
enum CameraFlashMode: String, CaseIterable, Codable {
    case off
    case on
    case auto

    var displayName: String {
        switch self {
        case .off: return "Off"
        case .on: return "On"
        case .auto: return "Auto"
        }
    }

    var icon: String {
        switch self {
        case .off: return "bolt.slash"
        case .on: return "bolt.fill"
        case .auto: return "bolt.badge.automatic"
        }
    }

    var description: String {
        switch self {
        case .off: return "Flash disabled"
        case .on: return "Flash always on"
        case .auto: return "Flash when needed"
        }
    }
    
    /// Convert to MijickCamera's CameraFlashMode
    var toMijickFlashMode: MijickCamera.CameraFlashMode {
        switch self {
        case .off: return .off
        case .on: return .on
        case .auto: return .auto
        }
    }
}
