// 引入必要的模块
const { contextBridge, ipcRenderer } = require('electron');

// 选择暴露给渲染进程的函数和变量
contextBridge.exposeInMainWorld('electronAPI', {
    sendFownloadFile: (message) => ipcRenderer.send('download-file', message),
    onClearTokenCache: (callback) => ipcRenderer.on('clear-token-cache', callback),
    tokenCacheCleared: () => ipcRenderer.send('token-cache-cleared')
});
