import Foundation public enum ShotdeckError: Error, LocalizedError, Sendable { case screenRecordingNotGranted case noRegionRemembered case displayNoLongerConnected(displayID: UInt32) case captureFailed(underlying: String) case spoolWriteFailed(path: String, underlying: String) case manifestCorrupt(path: String) case pdfCompositionFailed(reason: String) case airDropUnavailable case noCommentedReturns public var errorDescription: String? { switch self { case .screenRecordingNotGranted: return "Screen Recording is turned off. Grant it in System Settings to capture." case .noRegionRemembered: return "No capture region is set. Choose 'Re-select area' from the Redline menu." case .displayNoLongerConnected: return "The display used for capture is no longer connected." case .captureFailed(let underlying): return "The screenshot could not be taken. \(underlying)" case .spoolWriteFailed(_, let underlying): return "The screenshot could not be saved. \(underlying)" case .manifestCorrupt: return "This session's file is damaged and cannot be opened." case .pdfCompositionFailed(let reason): return "The PDF could not be built. \(reason)" case .airDropUnavailable: return "AirDrop is not available right now." case .noCommentedReturns: return "None of the returned PDFs have comments on them." } } }