import { CollectionFieldInterface } from "../../data-source/collection-field-interface/CollectionFieldInterface.mjs";
import { defaultProps, operators, unique } 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 EmailFieldInterface 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", 'email'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("Email")}}'), _define_property(this, "icon", 'CommentOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
            type: 'string',
            uiSchema: {
                type: 'string',
                'x-component': 'Input',
                'x-validator': 'email'
            }
        }), _define_property(this, "availableTypes", [
            'string'
        ]), _define_property(this, "hasDefaultValue", true), _define_property(this, "properties", {
            ...defaultProps,
            unique: unique
        }), _define_property(this, "filterable", {
            operators: operators.string
        }), _define_property(this, "titleUsable", true);
    }
}
export { EmailFieldInterface };
