// Electron API 类型声明 interface ElectronAPI { fetchPdf: ( pdfUrl: string ) => Promise<{ success: boolean; data?: string; error?: string }>; printPdf: (pdfUrl: string) => Promise<{ success: boolean; error?: string }>; startIdCardListen: () => Promise; stopIdCardListen: () => Promise; onIdCardData: (callback: (data: any) => void) => void; onIdCardError: (callback: (error: any) => void) => void; log: (level: string, message: any) => void; removeIdCardListeners: () => void; } interface Window { electronAPI: ElectronAPI; }