import { z } from "zod"

import { imageSchema } from "./image"

export const meetingRoomsSchema = z.object({
  data: z.array(
    z.object({
      attributes: z.object({
        name: z.string(),
        email: z.string().optional(),
        phoneNumber: z.string(),
        size: z.number(),
        doorWidth: z.number(),
        doorHeight: z.number(),
        length: z.number(),
        width: z.number(),
        height: z.number(),
        floorNumber: z.number(),
        content: z.object({
          images: z.array(imageSchema),
          texts: z.object({
            facilityInformation: z.string().optional(),
            surroundingInformation: z.string().optional(),
            descriptions: z.object({
              short: z.string().optional(),
              medium: z.string().optional(),
            }),
            meetingDescription: z
              .object({
                short: z.string().optional(),
                medium: z.string().optional(),
              })
              .optional(),
          }),
        }),
        seatings: z.array(
          z.object({
            type: z.string(),
            capacity: z.number(),
          })
        ),
        lighting: z.string(),
        sortOrder: z.number().optional(),
      }),
      id: z.string(),
      type: z.string(),
    })
  ),
})
