import SwiftUI

public extension HapticStyle {
    var sensoryFeedback: SensoryFeedback {
        switch self {
        case .impact(let style):
            switch style {
            case .light: return .impact(weight: .light)
            case .medium: return .impact(weight: .medium)
            case .heavy: return .impact(weight: .heavy)
            case .soft: return .impact(flexibility: .soft)
            case .rigid: return .impact(flexibility: .rigid)
            }

        case .notification(let type):
            switch type {
            case .success: return .success
            case .warning: return .warning
            case .error: return .error
            }

        case .selection:
            return .selection
        }
    }
}
