"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
(()=>{
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    ExpressionCollectionTemplate: ()=>ExpressionCollectionTemplate
});
const client_namespaceObject = require("@tachybase/evaluators/client");
const CollectionTemplate_js_namespaceObject = require("../../data-source/collection-template/CollectionTemplate.js");
const index_js_namespaceObject = require("./properties/index.js");
function _define_property(obj, key, value) {
    if (key in obj) Object.defineProperty(obj, key, {
        value: value,
        enumerable: true,
        configurable: true,
        writable: true
    });
    else obj[key] = value;
    return obj;
}
class ExpressionCollectionTemplate extends CollectionTemplate_js_namespaceObject.CollectionTemplate {
    constructor(...args){
        super(...args), _define_property(this, "name", 'expression'), _define_property(this, "title", '{{t("Expression collection")}}'), _define_property(this, "order", 4), _define_property(this, "color", 'orange'), _define_property(this, "default", {
            createdBy: true,
            updatedBy: true,
            createdAt: true,
            updatedAt: true,
            sortable: true,
            fields: [
                {
                    name: 'engine',
                    type: 'string',
                    interface: 'radioGroup',
                    uiSchema: {
                        type: 'string',
                        title: '{{t("Calculation engine")}}',
                        'x-component': 'Radio.Group',
                        enum: (0, client_namespaceObject.getOptions)(),
                        default: 'formula.js'
                    }
                },
                {
                    name: 'sourceCollection',
                    type: 'string',
                    interface: 'select',
                    uiSchema: {
                        type: 'string',
                        title: '{{t("Collection")}}',
                        'x-component': 'CollectionSelect',
                        'x-component-props': {}
                    }
                },
                {
                    name: 'expression',
                    type: 'text',
                    interface: 'expression',
                    uiSchema: {
                        type: 'string',
                        title: '{{t("Expression")}}',
                        'x-component': 'DynamicExpression'
                    }
                }
            ]
        }), _define_property(this, "availableFieldInterfaces", {
            include: []
        }), _define_property(this, "configurableProperties", (0, index_js_namespaceObject.getConfigurableProperties)('title', 'name', 'inherits', 'category', 'description', 'presetFields'));
    }
}
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
