import { app, ipcMain } from 'electron';

ipcMain.on('appVersionSync', (event, arg) => {
	console.log(arg);
	let currentVersion = '';

	if (process.env.NODE_ENV === 'development') {
		currentVersion = process.env.npm_package_version || '';
	} else {
		currentVersion = app.getVersion();
	}
	event.returnValue = currentVersion;
});
