/* 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 './events';
import BaseFields from '@yootheme/fields';
import essentials from '../api';
import hooks from '@yootheme/hooks';
import SourceExtended from './SourceExtended';

import * as fields from './fields';
import * as components from './components';

Object.assign(essentials.components, components);
Object.assign(BaseFields.components, fields);
essentials.SourceExtended = SourceExtended;

hooks.after('app.init', () => {
    // override the source query args field (until fixed in core)
    BaseFields.components.FieldSourceQueryArgs = fields.FieldYooessentialsSourceQueryArgs(
        BaseFields.components.FieldSourceQueryArgs
    );
});

export * from './components';
export { SourceExtended };
