/*
    ! /startup/screen/preload.js – Splash-Screen-IPC-Bridge
    ? This small module creates a secure bridge between the Electron backend and the splash screen frontend
*/

// % load electron dependencies
const { contextBridge, ipcRenderer } = require('electron');

// $ listener for splash screen updates from main process
contextBridge.exposeInMainWorld('splashAPI', {
    onUpdate: (callback) => ipcRenderer.on('update-splash', (event, data) => callback(data))
});