import { z } from 'zod';
import i18n from "@/lib/i18n";

export const loginSchema = z.object({
  email: z.string().email(i18n.t('lib.validators.text_1')),
  password: z.string().min(6, i18n.t('lib.validators.text_2')),
});

export type LoginFormData = z.infer<typeof loginSchema>;

export const otpSchema = z.object({
  otpCode: z.string().min(4, i18n.t('lib.validators.text_3')).max(6, i18n.t('lib.validators.text_4')),
});

export type OtpFormData = z.infer<typeof otpSchema>;

export const customerSchema = z.object({
  name: z.string().min(2, i18n.t('lib.validators.text_5')),
  email: z.string().email(i18n.t('lib.validators.text_6')),
  phone: z.string().min(10, i18n.t('lib.validators.text_7')),
  tier: z.enum(['retail', 'premium', 'institutional']),
});

export type CustomerFormData = z.infer<typeof customerSchema>;