
import Foundation
import UIKit

final class LightAim {
    static let shared = LightAim()

    private(set) var isEnabled = false
    private(set) var sensitivity: Double = 0.50
    private(set) var touchResponse: Double = 0.50

    func enable() {
        isEnabled = true
    }

    func disable() {
        isEnabled = false
    }

    func configure(
        sensitivity: Double,
        touchResponse: Double
    ) {
        self.sensitivity = min(max(sensitivity, 0.0), 1.0)
        self.touchResponse = min(max(touchResponse, 0.0), 1.0)
    }

    func getSettings() -> [String: Double] {
        return [
            "sensitivity": sensitivity,
            "touchResponse": touchResponse
        ]
    }
}
