import { z } from 'zod'

export const bookingStep1Schema = z.object({
  name: z.string().min(2, 'Name must be at least 2 characters'),
  email: z.string().min(1, 'Email is required').email('Please enter a valid email'),
  business_name: z.string().min(1, 'Business name is required'),
})

export const bookingStep2Schema = z.object({
  industry: z.string().min(1, 'Please select your industry'),
  pain_category: z.enum(['design', 'data', 'time'] as const, {
    error: 'Please select your biggest bottleneck',
  }),
  current_tools: z.string().min(1, 'Please describe your current tools'),
})

export const bookingStep3Schema = z.object({
  manual_hours_per_week: z.number().min(0).max(168),
  notes: z.string().optional(),
})

export const fullBookingSchema = bookingStep1Schema
  .merge(bookingStep2Schema)
  .merge(bookingStep3Schema)

export type BookingStep1 = z.infer<typeof bookingStep1Schema>
export type BookingStep2 = z.infer<typeof bookingStep2Schema>
export type BookingStep3 = z.infer<typeof bookingStep3Schema>
export type FullBooking = z.infer<typeof fullBookingSchema>
