//
//  CameraHDRMode.swift
//  SelfieCam
//
//  Created by Matt Bruce on 1/4/26.
//

import Foundation
import MijickCamera

/// Camera HDR mode options
enum CameraHDRMode: 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 description: String {
        switch self {
        case .off: return "HDR disabled"
        case .on: return "HDR always on"
        case .auto: return "HDR when needed"
        }
    }

    /// Convert to MijickCamera.CameraHDRMode
    var toMijickHDRMode: MijickCamera.CameraHDRMode {
        switch self {
        case .off: return .off
        case .on: return .on
        case .auto: return .auto
        }
    }

    /// Initialize from MijickCamera.CameraHDRMode
    init(from mijickMode: MijickCamera.CameraHDRMode) {
        switch mijickMode {
        case .off: self = .off
        case .on: self = .on
        case .auto: self = .auto
        }
    }
}
