import { z } from "zod"

// import { phoneValidator } from "@/utils/phoneValidator"

export const editProfileSchema = z.object({
  "address.city": z.string().optional(),
  "address.countryCode": z.string().min(1),
  "address.streetAddress": z.string().optional(),
  "address.zipCode": z.string().min(1),
  dateOfBirth: z.string().min(1),
  email: z.string().email(),
  language: z.string(),
  phoneNumber: z.string(),
  // phoneValidator(
  //   "Phone is required",
  //   "Please enter a valid phone number"
  // ),

  currentPassword: z.string().optional(),
  newPassword: z.string().optional(),
  retypeNewPassword: z.string().optional(),
})

export type EditProfileSchema = z.infer<typeof editProfileSchema>
