import { existsSync } from "fs";
import { resolve } from "path";

const DEBUG_PATH = resolve(__dirname, "../build/Debug/VirtualCamera.node");
const RELEASE_PATH = resolve(__dirname, "../build/Release/VirtualCamera.node");

export const Addon = existsSync(DEBUG_PATH) ? require(DEBUG_PATH) : existsSync(RELEASE_PATH) ? require(RELEASE_PATH) : null;