import { Button } from '@/components/ui/button'; import { Field, FieldError, FieldLabel } from '@/components/ui/field'; import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, } from '@/components/ui/input-otp'; import type { VerifyOtpValues } from '@/features/onboard/onboarding.types'; import { RefreshCw } from 'lucide-react'; import type { UseFormReturn } from 'react-hook-form'; type OnboardingVerifyOtpStepProps = { form: UseFormReturn; email: string | null; errorMessage: string | null; infoMessage: string | null; remainingAttempts: number; resendCooldownSeconds: number; isResending: boolean; onSubmit: (values: VerifyOtpValues) => Promise; onResend: () => Promise; }; export function OnboardingVerifyOtpStep({ form, email, errorMessage, infoMessage, remainingAttempts, resendCooldownSeconds, isResending, onSubmit, onResend, }: OnboardingVerifyOtpStepProps) { const resendDisabled = resendCooldownSeconds > 0 || isResending; return (

Ingresa el código de 6 dígitos que enviamos a{' '} {email ?? 'tu email'}.

Código de verificación
{ form.setValue('otp', value, { shouldValidate: true }); }} >

Intentos restantes: {remainingAttempts}

{errorMessage &&

{errorMessage}

} {infoMessage &&

{infoMessage}

}
); }