



export function jsVar(variableName) {
    if (!(window["neoGlobalEnqueueBackendNeoDrawFull"] || window["neoGlobalEnqueueFrontendNeoDrawFull"])) { throw new Error("The neoWP JS variables have not been initialized yet. Problem with the enqueue global?"); }
    if (window["neoGlobalEnqueueBackendNeoDrawFull"]  && window["neoGlobalEnqueueBackendNeoDrawFull"][variableName]  !== undefined) { return window["neoGlobalEnqueueBackendNeoDrawFull"][variableName]; }
    if (window["neoGlobalEnqueueFrontendNeoDrawFull"] && window["neoGlobalEnqueueFrontendNeoDrawFull"][variableName] !== undefined) { return window["neoGlobalEnqueueFrontendNeoDrawFull"][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["neoGlobalEnqueueBackendNeoDrawFull"] || window["neoGlobalEnqueueFrontendNeoDrawFull"])) { throw new Error("The neoWP JS variables have not been initialized yet. Problem with the enqueue global?"); }
    return (window["neoGlobalEnqueueBackendNeoDrawFull"] || window["neoGlobalEnqueueFrontendNeoDrawFull"])?.[variableName] !== undefined;
}
