'use client';

import { FormWrapper, FormWrapperProps, useFormContext, useFormField } from './form-wrapper';
import { PasswordConfirmationField, PasswordFieldProps } from './password-field';
import { EmailField, EmailFieldProps } from './email-field';
import { PhoneField, PhoneFieldProps } from './phone-field';
import { VerificationCode, VerificationCodeProps } from './verification-code';
import { default as FieldError, FieldErrorProps, useFieldError } from './field-error';
export { FormWrapper, useFormContext, useFormField, FormContext, type FormWrapperProps } from './form-wrapper';
export { FieldError, useFieldError, type FieldErrorProps } from './field-error';
export { PasswordField, PasswordConfirmationField, type PasswordFieldProps, type PasswordRules, type PasswordStrength, type PasswordRequirement } from './password-field';
export { EmailField, type EmailFieldProps, type EmailValidation } from './email-field';
export { PhoneField, type PhoneFieldProps, type Country } from './phone-field';
export { VerificationCode, type VerificationCodeProps } from './verification-code';
/**
 * Common validation rules for forms
 */
export declare const ValidationRules: {
    email: RegExp;
    phone: RegExp;
    password: {
        minLength: number;
        maxLength: number;
        requireUppercase: RegExp;
        requireLowercase: RegExp;
        requireNumbers: RegExp;
        requireSpecialChars: RegExp;
    };
    verificationCode: {
        numeric: RegExp;
        alphanumeric: RegExp;
    };
};
/**
 * Common validation functions
 */
export declare const ValidationHelpers: {
    isValidEmail: (email: string) => boolean;
    isValidPhone: (phone: string) => boolean;
    isStrongPassword: (password: string) => boolean;
    isValidVerificationCode: (code: string, length: number, type?: "numeric" | "alphanumeric") => boolean;
};
/**
 * Collection of all form field components
 */
export declare const FormFields: {
    readonly PasswordField: import('react').MemoExoticComponent<typeof import('./password-field').PasswordFieldComponent>;
    readonly PasswordConfirmationField: typeof PasswordConfirmationField;
    readonly EmailField: typeof EmailField;
    readonly PhoneField: typeof PhoneField;
    readonly VerificationCode: typeof VerificationCode;
};
/**
 * Collection of form utility components
 */
export declare const FormUtilities: {
    readonly FormWrapper: typeof FormWrapper;
    readonly FieldError: typeof FieldError;
};
/**
 * Collection of form hooks
 */
export declare const FormHooks: {
    readonly useFormContext: typeof useFormContext;
    readonly useFormField: typeof useFormField;
    readonly useFieldError: typeof useFieldError;
};
/**
 * Collection of form field prop types
 */
export type FormFieldProps = {
    PasswordField: PasswordFieldProps;
    EmailField: EmailFieldProps;
    PhoneField: PhoneFieldProps;
    VerificationCode: VerificationCodeProps;
};
/**
 * Collection of form utility prop types
 */
export type FormUtilityProps = {
    FormWrapper: FormWrapperProps;
    FieldError: FieldErrorProps;
};
/**
 * Common form configurations for different auth flows
 */
export declare const FormPresets: {
    readonly signIn: {
        readonly fields: readonly ["email", "password"];
        readonly validation: {
            readonly email: {
                readonly required: true;
                readonly validateFormat: true;
            };
            readonly password: {
                readonly required: true;
                readonly minLength: 1;
            };
        };
    };
    readonly signUp: {
        readonly fields: readonly ["email", "password", "passwordConfirmation"];
        readonly validation: {
            readonly email: {
                readonly required: true;
                readonly validateFormat: true;
            };
            readonly password: {
                readonly required: true;
                readonly showStrength: true;
            };
            readonly passwordConfirmation: {
                readonly required: true;
                readonly mustMatch: "password";
            };
        };
    };
    readonly resetPassword: {
        readonly fields: readonly ["email"];
        readonly validation: {
            readonly email: {
                readonly required: true;
                readonly validateFormat: true;
            };
        };
    };
    readonly changePassword: {
        readonly fields: readonly ["currentPassword", "newPassword", "confirmPassword"];
        readonly validation: {
            readonly currentPassword: {
                readonly required: true;
            };
            readonly newPassword: {
                readonly required: true;
                readonly showStrength: true;
            };
            readonly confirmPassword: {
                readonly required: true;
                readonly mustMatch: "newPassword";
            };
        };
    };
    readonly verifyEmail: {
        readonly fields: readonly ["verificationCode"];
        readonly validation: {
            readonly verificationCode: {
                readonly required: true;
                readonly length: 6;
                readonly type: "numeric";
            };
        };
    };
    readonly verifyPhone: {
        readonly fields: readonly ["phone", "verificationCode"];
        readonly validation: {
            readonly phone: {
                readonly required: true;
                readonly validateFormat: true;
            };
            readonly verificationCode: {
                readonly required: true;
                readonly length: 6;
                readonly type: "numeric";
            };
        };
    };
    readonly setupMFA: {
        readonly fields: readonly ["verificationCode"];
        readonly validation: {
            readonly verificationCode: {
                readonly required: true;
                readonly length: 6;
                readonly type: "numeric";
            };
        };
    };
    readonly verifyMFA: {
        readonly fields: readonly ["verificationCode"];
        readonly validation: {
            readonly verificationCode: {
                readonly required: true;
                readonly length: 6;
                readonly type: "numeric";
            };
        };
    };
    readonly organizationInvite: {
        readonly fields: readonly ["email"];
        readonly validation: {
            readonly email: {
                readonly required: true;
                readonly validateFormat: true;
            };
        };
    };
};
/**
 * Utility function to build forms from presets
 */
export declare function buildForm(preset: keyof typeof FormPresets, overrides?: any): any;
/**
 * Generic form state interface
 */
export interface FormState {
    values: Record<string, any>;
    errors: Record<string, string | string[]>;
    touched: Record<string, boolean>;
    isSubmitting: boolean;
    isValid: boolean;
    isDirty: boolean;
}
/**
 * Form action types
 */
export type FormAction = {
    type: 'SET_VALUE';
    field: string;
    value: any;
} | {
    type: 'SET_ERROR';
    field: string;
    error: string | string[] | null;
} | {
    type: 'SET_TOUCHED';
    field: string;
    touched: boolean;
} | {
    type: 'SET_SUBMITTING';
    isSubmitting: boolean;
} | {
    type: 'RESET_FORM';
    initialValues?: Record<string, any>;
} | {
    type: 'CLEAR_ERRORS';
};
/**
 * Form reducer function
 */
export declare function formReducer(state: FormState, action: FormAction): FormState;
declare const _default: {
    FormWrapper: typeof FormWrapper;
    FieldError: typeof FieldError;
    PasswordField: import('react').MemoExoticComponent<typeof import('./password-field').PasswordFieldComponent>;
    EmailField: typeof EmailField;
    PhoneField: typeof PhoneField;
    VerificationCode: typeof VerificationCode;
    ValidationHelpers: {
        isValidEmail: (email: string) => boolean;
        isValidPhone: (phone: string) => boolean;
        isStrongPassword: (password: string) => boolean;
        isValidVerificationCode: (code: string, length: number, type?: "numeric" | "alphanumeric") => boolean;
    };
    FormPresets: {
        readonly signIn: {
            readonly fields: readonly ["email", "password"];
            readonly validation: {
                readonly email: {
                    readonly required: true;
                    readonly validateFormat: true;
                };
                readonly password: {
                    readonly required: true;
                    readonly minLength: 1;
                };
            };
        };
        readonly signUp: {
            readonly fields: readonly ["email", "password", "passwordConfirmation"];
            readonly validation: {
                readonly email: {
                    readonly required: true;
                    readonly validateFormat: true;
                };
                readonly password: {
                    readonly required: true;
                    readonly showStrength: true;
                };
                readonly passwordConfirmation: {
                    readonly required: true;
                    readonly mustMatch: "password";
                };
            };
        };
        readonly resetPassword: {
            readonly fields: readonly ["email"];
            readonly validation: {
                readonly email: {
                    readonly required: true;
                    readonly validateFormat: true;
                };
            };
        };
        readonly changePassword: {
            readonly fields: readonly ["currentPassword", "newPassword", "confirmPassword"];
            readonly validation: {
                readonly currentPassword: {
                    readonly required: true;
                };
                readonly newPassword: {
                    readonly required: true;
                    readonly showStrength: true;
                };
                readonly confirmPassword: {
                    readonly required: true;
                    readonly mustMatch: "newPassword";
                };
            };
        };
        readonly verifyEmail: {
            readonly fields: readonly ["verificationCode"];
            readonly validation: {
                readonly verificationCode: {
                    readonly required: true;
                    readonly length: 6;
                    readonly type: "numeric";
                };
            };
        };
        readonly verifyPhone: {
            readonly fields: readonly ["phone", "verificationCode"];
            readonly validation: {
                readonly phone: {
                    readonly required: true;
                    readonly validateFormat: true;
                };
                readonly verificationCode: {
                    readonly required: true;
                    readonly length: 6;
                    readonly type: "numeric";
                };
            };
        };
        readonly setupMFA: {
            readonly fields: readonly ["verificationCode"];
            readonly validation: {
                readonly verificationCode: {
                    readonly required: true;
                    readonly length: 6;
                    readonly type: "numeric";
                };
            };
        };
        readonly verifyMFA: {
            readonly fields: readonly ["verificationCode"];
            readonly validation: {
                readonly verificationCode: {
                    readonly required: true;
                    readonly length: 6;
                    readonly type: "numeric";
                };
            };
        };
        readonly organizationInvite: {
            readonly fields: readonly ["email"];
            readonly validation: {
                readonly email: {
                    readonly required: true;
                    readonly validateFormat: true;
                };
            };
        };
    };
};
export default _default;
//# sourceMappingURL=index.d.ts.map