import { email } from '../../fields/validations.js';
export const emailField = ({ required = true })=>({
        name: 'email',
        type: 'email',
        admin: {
            components: {
                Field: required ? ()=>null : undefined
            }
        },
        hooks: {
            beforeChange: [
                ({ value })=>{
                    if (value) {
                        return value.toLowerCase().trim();
                    }
                }
            ]
        },
        label: ({ t })=>t('general:email'),
        required,
        unique: true,
        validate: email
    });

//# sourceMappingURL=email.js.map