import UIKit

/// Centralized haptic feedback manager for CelestiaTrace.
enum HapticManager {
    enum HapticType {
        case recordStart
        case recordStop
        case photoCapture
        case noteAdded
        case tapFeedback
    }
    
    static func trigger(_ type: HapticType) {
        switch type {
        case .recordStart:
            let generator = UIImpactFeedbackGenerator(style: .heavy)
            generator.prepare()
            generator.impactOccurred()
        case .recordStop:
            let generator = UINotificationFeedbackGenerator()
            generator.prepare()
            generator.notificationOccurred(.success)
        case .photoCapture:
            let generator = UIImpactFeedbackGenerator(style: .medium)
            generator.prepare()
            generator.impactOccurred()
        case .noteAdded:
            let generator = UIImpactFeedbackGenerator(style: .light)
            generator.prepare()
            generator.impactOccurred()
        case .tapFeedback:
            let generator = UIImpactFeedbackGenerator(style: .soft)
            generator.prepare()
            generator.impactOccurred()
        }
    }
}
