import { z } from "zod"

export const ticketSubcategorySchema = z.object({
  id: z.string(),
  name: z.string(),
  slug: z.string().optional(),
  order: z.number().optional(),
  categoryId: z.string().optional(),
})
export type TicketSubcategory = z.infer<typeof ticketSubcategorySchema>

export const ticketCategorySchema = z.object({
  id: z.string(),
  name: z.string(),
  slug: z.string().optional(),
  description: z.string().optional().nullable(),
  order: z.number().optional(),
  secondary: z.array(ticketSubcategorySchema),
})
export type TicketCategory = z.infer<typeof ticketCategorySchema>
