import Foundation
import RideFormCore
#if os(iOS)
import UIKit
#else
import WatchKit
#endif

@MainActor
enum CapturePlatform {
    static var platform: RecordingPlatform {
        #if os(watchOS)
        return .appleWatch
        #else
        return .iphone
        #endif
    }
    static var osVersion: String {
        #if os(watchOS)
        return WKInterfaceDevice.current().systemVersion
        #else
        return UIDevice.current.systemVersion
        #endif
    }
    static var idleTimerDisabled: Bool {
        get {
            #if os(iOS)
            return UIApplication.shared.isIdleTimerDisabled
            #else
            return false
            #endif
        }
        set {
            #if os(iOS)
            UIApplication.shared.isIdleTimerDisabled = newValue
            #endif
            // Watch execution is managed by its scene handler and bounded runtime session.
        }
    }
}
