'use client';
import { OIDInput } from '../../../ui/components/data-entry/oid-input/index.js';
import { withFieldValidation } from '../fragments/with-field-validation/index.js';
const OIDField = withFieldValidation(OIDInput, {
    validations: {
        _validOIDFormat: () => (value) => {
            if (value === '' || value === undefined) {
                return true;
            }
            const uuidPattern = '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$';
            const isValidUUID = new RegExp(uuidPattern).test(value);
            if (!isValidUUID) {
                return 'Invalid uuid format. Please enter a valid uuid v4.';
            }
            return true;
        },
    },
});
OIDField.displayName = 'OIDField';
export { OIDField };
//# sourceMappingURL=oid-field.js.map