import { CollectionFieldInterface } from "../../data-source/collection-field-interface/CollectionFieldInterface.mjs";
import { dataSource, defaultProps, operators } 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 CheckboxGroupFieldInterface extends CollectionFieldInterface {
    schemaInitialize(schema, param) {
        let { block } = param;
        if ([
            'Table',
            'Kanban'
        ].includes(block)) {
            schema['x-component-props'] = schema['x-component-props'] || {};
            schema['x-component-props']['ellipsis'] = true;
        }
    }
    constructor(...args){
        super(...args), _define_property(this, "name", 'checkboxGroup'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "icon", 'UnorderedListOutlined'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("Checkbox group")}}'), _define_property(this, "default", {
            interface: 'checkboxGroup',
            type: 'array',
            defaultValue: [],
            uiSchema: {
                type: 'string',
                'x-component': 'Checkbox.Group'
            }
        }), _define_property(this, "availableTypes", [
            'array'
        ]), _define_property(this, "hasDefaultValue", true), _define_property(this, "properties", {
            ...defaultProps,
            'uiSchema.enum': dataSource
        }), _define_property(this, "filterable", {
            operators: operators.array
        });
    }
}
export { CheckboxGroupFieldInterface };
