import { z } from 'zod'

export const companySignupSchema = z.object({
  firstName: z.string().min(1).max(80),
  lastName: z.string().min(1).max(80),
  email: z.string().email(),
  password: z.string().min(8).max(128),
  companyName: z.string().min(2).max(120),
  legalName: z.string().min(2).max(160),
  legalForm: z.string().min(1).max(80),
  registrationNumber: z.string().min(1).max(120),
  iceNumber: z.string().min(1).max(120),
  taxId: z.string().min(1).max(120),
  operatingLicenseNumber: z.string().min(1).max(120),
  operatingLicenseIssuedAt: z.string().min(1).max(40),
  operatingLicenseIssuedBy: z.string().min(1).max(160),
  streetAddress: z.string().min(1).max(200),
  city: z.string().min(1).max(120),
  country: z.string().min(1).max(120),
  zipCode: z.string().min(1).max(40),
  companyPhone: z.string().min(1).max(80),
  companyEmail: z.string().email(),
  fax: z.string().max(80).optional(),
  yearsActive: z.string().min(1).max(80),
  representativeName: z.string().max(160).optional(),
  representativeTitle: z.string().max(120).optional(),
  responsibleName: z.string().min(1).max(160),
  responsibleRole: z.string().min(1).max(120),
  responsibleIdentityNumber: z.string().min(1).max(120),
  responsibleQualification: z.string().max(200).optional(),
  responsiblePhone: z.string().min(1).max(80),
  responsibleEmail: z.string().email(),
  preferredLanguage: z.enum(['en', 'fr', 'ar']).default('en'),
  plan: z.enum(['STARTER', 'GROWTH', 'PRO']),
  billingPeriod: z.enum(['MONTHLY', 'ANNUAL']),
  currency: z.literal('MAD'),
  paymentProvider: z.enum(['AMANPAY', 'PAYPAL']),
})
