import UIKit

enum VoiceRecordingAsset: String {
    case iconMicrophone = "VoiceRecordingIconMicrophone"
    case iconVideo = "VoiceRecordingIconVideo"
    case cancelArrow = "VoiceRecordingCancelArrow"
    case inputMicOverlay = "VoiceRecordingInputMicOverlay"
    case recordSendIcon = "VoiceRecordingRecordSendIcon"
    case videoRecordArrow = "VoiceRecordingVideoRecordArrow"
    case pause = "VoiceRecordingPause"
    case switchCamera = "VoiceRecordingSwitchCamera"
    case viewOnce = "VoiceRecordingViewOnce"
    case viewOnceEnabled = "VoiceRecordingViewOnceEnabled"
    case delete = "VoiceRecordingDelete"
    case send = "VoiceRecordingSend"
}

enum VoiceRecordingLottieAsset: String {
    case binRed = "voice_bin_red"
    case binBlue = "voice_bin_blue"
    case lockWait = "voice_lock_wait"
    case lock = "voice_lock"
    case lockPause = "voice_lock_pause"
    case playPause = "voice_anim_playpause"
    case micToVideo = "voice_anim_mic_to_video"
    case videoToMic = "voice_anim_video_to_mic"
}

enum VoiceRecordingAssets {
    static func image(_ asset: VoiceRecordingAsset, templated: Bool = false) -> UIImage? {
        guard let image = UIImage(named: asset.rawValue) else {
            assertionFailure("Missing voice recording asset: \(asset.rawValue)")
            return nil
        }
        return templated ? image.withRenderingMode(.alwaysTemplate) : image
    }
}
