import { CollectionFieldInterface } from "../../data-source/collection-field-interface/CollectionFieldInterface.mjs";
import { 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 UnixTimestampFieldInterface extends CollectionFieldInterface {
    constructor(...args){
        super(...args), _define_property(this, "name", 'unixTimestamp'), _define_property(this, "type", 'object'), _define_property(this, "group", 'datetime'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Unix Timestamp")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
            type: 'bigInt',
            uiSchema: {
                type: 'number',
                'x-component': 'UnixTimestamp',
                'x-component-props': {
                    accuracy: 'millisecond',
                    showTime: true
                }
            }
        }), _define_property(this, "availableTypes", [
            'integet',
            'bigInt'
        ]), _define_property(this, "hasDefaultValue", true), _define_property(this, "properties", {
            ...defaultProps,
            'uiSchema.x-component-props.accuracy': {
                type: 'string',
                title: '{{t("Accuracy")}}',
                'x-component': 'Radio.Group',
                'x-decorator': 'FormItem',
                default: 'millisecond',
                enum: [
                    {
                        value: 'millisecond',
                        label: '{{t("Millisecond")}}'
                    },
                    {
                        value: 'second',
                        label: '{{t("Second")}}'
                    }
                ]
            }
        }), _define_property(this, "filterable", {
            operators: operators.number
        }), _define_property(this, "titleUsable", true);
    }
}
export { UnixTimestampFieldInterface };
