import AppKit import CallsKit import SwiftUI /// Offline visual fixtures of Calls → Settings…, beside the lobby's. The /// window is drawn with a throwaway defaults suite so a fixture never /// changes the preferences of the person running it. @MainActor enum SettingsSnapshots { static func save(to folder: URL) async throws { let suite = "CallsInterop.SettingsSnapshots" guard let defaults = UserDefaults(suiteName: suite) else { return } defaults.removePersistentDomain(forName: suite) defer { defaults.removePersistentDomain(forName: suite) } for scheme in [ColorScheme.light, .dark] { try await LobbySnapshots.render( CallsSettingsView(model: CallsModel(defaults: defaults)).defaultAppStorage(defaults), scheme: scheme, size: nil, to: folder.appendingPathComponent("settings-\(LobbySnapshots.name(scheme)).png")) } } }