import { z } from "zod";
import type { Messages } from "@/shared/i18n/config";

export const updateTicketSchema = (t: Messages) =>
  z.object({
    title: z
      .string()
      .min(1, t.validation.titleRequired)
      .max(255, t.validation.titleMaxLength)
      .optional(),
    description: z.string().optional(),
    status: z.string().optional(),
    priority: z.string().optional(),
    category_id: z.number().optional(),
  });

export type UpdateTicketFormValues = z.infer<ReturnType<typeof updateTicketSchema>>;
