import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
import * as __WEBPACK_EXTERNAL_MODULE__data_source_collection_field_interface_CollectionFieldInterface_mjs__ from "../../data-source/collection-field-interface/CollectionFieldInterface.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 CreatedByFieldInterface extends __WEBPACK_EXTERNAL_MODULE__data_source_collection_field_interface_CollectionFieldInterface_mjs__.CollectionFieldInterface {
    schemaInitialize(schema, param) {
        let { block } = param;
        schema['properties'] = {
            viewer: (0, __WEBPACK_EXTERNAL_MODULE_lodash__.cloneDeep)(__WEBPACK_EXTERNAL_MODULE__properties_index_mjs__.recordPickerViewer)
        };
        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", 'createdBy'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 3), _define_property(this, "title", '{{t("Created by")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
            type: 'belongsTo',
            target: 'users',
            foreignKey: 'createdById',
            uiSchema: {
                type: 'object',
                title: '{{t("Created by")}}',
                'x-component': 'AssociationField',
                'x-component-props': {
                    fieldNames: {
                        value: 'id',
                        label: 'nickname'
                    }
                },
                'x-read-pretty': true
            }
        }), _define_property(this, "availableTypes", [
            'belongsTo'
        ]), _define_property(this, "properties", {
            ...__WEBPACK_EXTERNAL_MODULE__properties_index_mjs__.defaultProps
        }), _define_property(this, "filterable", {
            nested: true,
            children: []
        });
    }
}
export { CreatedByFieldInterface };
