import "../components/display-component.js";

// Global Vue components
VueView.component('field-component', 'layout:assets/vue-components/field-component.js');
VueView.component('field-layout', 'layout:assets/vue-components/field-layout.js');


let layoutComponentsPromise = null;

App.utils.getlayoutComponents = () => {

    if (layoutComponentsPromise) return layoutComponentsPromise;

    layoutComponentsPromise = new Promise((resolve) => {

        import(App.route(`/layout/components?v=${App.version}`)).then(m => {
            resolve(m.default);
        });
    });

    return layoutComponentsPromise;
}
