import { z } from "zod"

export enum FloorPreference {
  LOW = "Low floor",
  HIGH = "High floor",
}

export enum ElevatorPreference {
  AWAY_FROM_ELEVATOR = "Away from elevator",
  NEAR_ELEVATOR = "Near elevator",
}

export const specialRequestSchema = z
  .object({
    floorPreference: z
      .nativeEnum(FloorPreference)
      .or(z.literal("").transform((_) => undefined))
      .optional(),
    elevatorPreference: z
      .nativeEnum(ElevatorPreference)
      .or(z.literal("").transform((_) => undefined))
      .optional(),
    comment: z.string().default(""),
  })
  .optional()
