import { contextBridge, ipcRenderer } from 'electron';

const API_HANDLERS = [
  "vnscene:test"
];

contextBridge.exposeInMainWorld(
  'dawnapi',
  API_HANDLERS.reduce((acc, key) => {
    acc[key] = (...args:any) => ipcRenderer.invoke(key, ...args);
    return acc;
  }, {} as {[key:string]:()=>any})
);