



export function jsVar(variableName) {
    if (!(window["neoGlobalEnqueueBackendNeoMotionBeta"] || window["neoGlobalEnqueueFrontendNeoMotionBeta"])) { throw new Error("The neoWP JS variables have not been initialized yet. Problem with the enqueue global?"); }
    if (window["neoGlobalEnqueueBackendNeoMotionBeta"]  && window["neoGlobalEnqueueBackendNeoMotionBeta"][variableName]  !== undefined) { return window["neoGlobalEnqueueBackendNeoMotionBeta"][variableName]; }
    if (window["neoGlobalEnqueueFrontendNeoMotionBeta"] && window["neoGlobalEnqueueFrontendNeoMotionBeta"][variableName] !== undefined) { return window["neoGlobalEnqueueFrontendNeoMotionBeta"][variableName]; }
    throw new Error("Missing JS variable: " + variableName + ". Make sure it is registered via enqueue_js_variable_backend(...) or enqueue_js_variable_frontend(...).");
}


export function jsVarExists(variableName) {
    if (!(window["neoGlobalEnqueueBackendNeoMotionBeta"] || window["neoGlobalEnqueueFrontendNeoMotionBeta"])) { throw new Error("The neoWP JS variables have not been initialized yet. Problem with the enqueue global?"); }
    return (window["neoGlobalEnqueueBackendNeoMotionBeta"] || window["neoGlobalEnqueueFrontendNeoMotionBeta"])?.[variableName] !== undefined;
}
