import AppKit import ParcelConfig import SwiftUI struct SetupShortcutRecorder: NSViewRepresentable { let captured: @MainActor (Result) -> Void func makeNSView(context: Context) -> RecordingButton { let button = RecordingButton() button.title = SettingsText.string("Listening for a shortcut…") button.bezelStyle = .rounded button.captured = captured return button } func updateNSView(_ nsView: RecordingButton, context: Context) { nsView.captured = captured } }