import { z } from 'zod';

export const upsertNeedsSchema = z.object({
  needsWheelchair: z.boolean().optional(),
  needsGroundFloor: z.boolean().optional(),
  needsHearingLoop: z.boolean().optional(),
  needsSignLanguage: z.boolean().optional(),
  otherAccessibility: z.string().max(1000).nullable().optional(),

  isVegan: z.boolean().optional(),
  isVegetarian: z.boolean().optional(),
  isGlutenFree: z.boolean().optional(),
  isHalal: z.boolean().optional(),
  isKosher: z.boolean().optional(),
  hasNutAllergy: z.boolean().optional(),
  otherDietary: z.string().max(1000).nullable().optional(),

  needsChildcare: z.boolean().optional(),
  childcareDetails: z.string().max(1000).nullable().optional(),
  needsTransportation: z.boolean().optional(),
  transportationNotes: z.string().max(1000).nullable().optional(),

  preferredLanguage: z.string().max(10).nullable().optional(),
  needsTranslation: z.boolean().optional(),
  translationLanguage: z.string().max(100).nullable().optional(),

  visibilityConsent: z.enum(['organizer_only', 'shared_with_hosts', 'public']).default('organizer_only'),
});

export const getNeedsSchema = z.object({
  id: z.string().min(1),
});

export type UpsertNeedsInput = z.infer<typeof upsertNeedsSchema>;
export type GetNeedsInput = z.infer<typeof getNeedsSchema>;
