import * as __WEBPACK_EXTERNAL_MODULE__tachybase_evaluators_client__ from "@tachybase/evaluators/client";
import * as __WEBPACK_EXTERNAL_MODULE__data_source_collection_template_CollectionTemplate_mjs__ from "../../data-source/collection-template/CollectionTemplate.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__properties_index_mjs__ from "./properties/index.mjs";
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 __WEBPACK_EXTERNAL_MODULE__data_source_collection_template_CollectionTemplate_mjs__.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, __WEBPACK_EXTERNAL_MODULE__tachybase_evaluators_client__.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, __WEBPACK_EXTERNAL_MODULE__properties_index_mjs__.getConfigurableProperties)('title', 'name', 'inherits', 'category', 'description', 'presetFields'));
    }
}
export { ExpressionCollectionTemplate };
