import type { KeybindingActionId, KeybindingFileSnapshot } from '../../shared/keybindings' import type { WarpThemeImportPreview, WarpThemeImportSource } from '../../shared/terminal-custom-themes' import type { GhosttyImportPreview, GlobalSettings } from '../../shared/global-settings-types' export type SettingsApi = { get: () => Promise /** Synchronous persisted-settings read for startup decisions that can't wait for async hydration. Blocking IPC — call sparingly. */ getSync: () => GlobalSettings | null set: (args: Partial) => Promise setActiveRuntimeEnvironmentPreference: (args: { environmentId: string | null }) => Promise updatePRBotAuthorOverride: (args: { author: string; isBot: boolean }) => Promise listFonts: () => Promise previewGhosttyImport: () => Promise previewWarpThemeImport: (source: WarpThemeImportSource) => Promise /** Subscribe to out-of-band settings updates (e.g. View > Appearance toggles) to stay in sync with main. */ onChanged: (callback: (updates: Partial) => void) => () => void } export type KeybindingsApi = { get: () => Promise ensureFile: () => Promise setAction: (args: { actionId: KeybindingActionId bindings: string[] | null }) => Promise reload: () => Promise openFile: () => Promise revealFile: () => Promise onChanged: (callback: (snapshot: KeybindingFileSnapshot) => void) => () => void }