import { z } from "zod"

const ACCEPTED_MIME_TYPES = ["text/csv", "text/comma-separated-values"]

export const importSchema = z.object({
  file: z.file()
    .refine((file) => ACCEPTED_MIME_TYPES.includes(file.type), {
        error: "File must be a CSV"
    }),
  categoryId: z.string().optional(),
})

export type ImportFormType = z.infer<typeof importSchema>
