/* Essentials YOOtheme Pro 2.2.16 build 0813.1608; ZOOlanders https://www.zoolanders.com; Copyright (C) Joolanders, SL; http://www.gnu.org/licenses/gpl.html GNU/GPL */

import Vue from 'vue';
import api from '@yootheme/api';
import hooks from '@yootheme/hooks';
import Util, * as util from './util';

Util(Vue);

const NAMESPACE = 'yooessentials';

const essentials = (window[NAMESPACE] = window[NAMESPACE] ?? {});

essentials.util = util;
essentials.panels = {};
essentials.models = {};
essentials.components = {};

hooks.before('app.init', () => {
    essentials.customizer = api.customizer?.yooessentials || {};
    essentials.version = essentials.customizer.version || '';
});

export default essentials;
