import { z } from "zod"

import { imageSchema } from "@/server/routers/hotels/schemas/image"

import { nullableStringValidator } from "@/utils/zod/stringValidator"

export const facilitySchema = z.object({
  headingText: nullableStringValidator,
  heroImages: z
    .array(imageSchema)
    .nullish()
    .transform((arr) => (arr ? arr.filter(Boolean) : [])),
})
