import { useFormik } from 'formik'; import { FC } from 'react'; import * as Yup from 'yup'; export interface UserSettingsFormValues { email: string; timezone: string; siteLanguage: string; currency: string; darkMode: boolean; directChallenge: boolean; displayName?: string; [key: string]: string | boolean | undefined; } export interface UserSettingsFormProps { initialValues: UserSettingsFormValues; onSubmit: (values: UserSettingsFormValues) => Promise<{ success: boolean; message: string; } | { error: string; errorType?: string; field?: string; errors?: Array<{ path: string; msg: string; }>; }>; languages: Array<{ code: string; label: string; }>; emailValidation?: Yup.StringSchema; timezoneValidation?: Yup.StringSchema; siteLanguageValidation?: Yup.StringSchema; currencyValidation?: Yup.StringSchema; darkModeValidation?: Yup.BooleanSchema; directChallengeValidation?: Yup.BooleanSchema; displayNameValidation?: Yup.StringSchema; additionalFields?: (formik: ReturnType>) => React.ReactNode; additionalInitialValues?: Record; additionalValidation?: Record; /** * Current TOTP 2FA status. When undefined (not passed), no TOTP controls are rendered. * When false, an "Enable 2FA" button is shown. When true, "Disable 2FA" and "Reset 2FA" buttons are shown. */ totpEnabled?: boolean; /** * Called to initiate TOTP setup (e.g. AuthService.setupTotp()). * Must return provisioning URI and secret on success, or an error. */ onTotpSetup?: () => Promise<{ provisioningUri: string; secret: string; } | { error: string; }>; /** * Called to confirm TOTP setup with a 6-digit code (e.g. AuthService.confirmTotp()). */ onTotpConfirm?: (code: string) => Promise<{ success: boolean; } | { error: string; }>; /** * Called to disable TOTP with a 6-digit code (e.g. AuthService.disableTotp()). */ onTotpDisable?: (code: string) => Promise<{ success: boolean; } | { error: string; }>; /** * Called to reset TOTP with a 6-digit code (e.g. AuthService.resetTotp()). * Returns new provisioning URI and secret on success. */ onTotpReset?: (code: string) => Promise<{ provisioningUri: string; secret: string; } | { error: string; }>; labels?: { title?: string; email?: string; emailHelper?: string; timezone?: string; siteLanguage?: string; currency?: string; darkMode?: string; directChallenge?: string; directChallengeHelper?: string; displayName?: string; saving?: string; save?: string; successMessage?: string; totpSectionTitle?: string; totpStatusEnabled?: string; totpStatusDisabled?: string; totpEnableButton?: string; totpDisableButton?: string; totpResetButton?: string; totpDisableCodeLabel?: string; totpDisableSubmitButton?: string; totpResetCodeLabel?: string; totpResetSubmitButton?: string; totpCancelButton?: string; totpError?: string; }; } export declare const UserSettingsForm: FC; export default UserSettingsForm; //# sourceMappingURL=UserSettingsForm.d.ts.map