import ObjectIdImport from 'bson-objectid';
const ObjectId = ObjectIdImport.default || ObjectIdImport;
const generateID = ({ operation, value })=>(operation !== 'create' ? value : false) || new ObjectId().toHexString();
export const baseIDField = {
    name: 'id',
    type: 'text',
    admin: {
        disabled: true
    },
    hooks: {
        beforeChange: [
            generateID
        ]
    },
    label: 'ID'
};

//# sourceMappingURL=baseIDField.js.map