import { TDraftEvent, TRelayGroup, TTheme, TThemeSetting } from '@common/types' import { ElectronAPI } from '@electron-toolkit/preload' import { Event } from 'nostr-tools' declare global { interface Window { electron: ElectronAPI api: { system: { isEncryptionAvailable: () => Promise } theme: { onChange: (cb: (theme: TTheme) => void) => void current: () => Promise themeSetting: () => Promise set: (themeSetting: TThemeSetting) => Promise } storage: { getRelayGroups: () => Promise setRelayGroups: (relayGroups: TRelayGroup[]) => Promise } nostr: { login: (nsec: string) => Promise<{ pubkey?: string reason?: string }> logout: () => Promise getPublicKey: () => Promise signEvent: (draftEvent: TDraftEvent) => Promise } } } }