import { z } from "zod";

export const feedbackSchema = z.object({
  score: z.number().min(1).max(5).nullable(),
  tujuan_tercapai: z.boolean().nullable(),
  tujuan_ditemukan: z.boolean().nullable(),
  tujuan: z.string().nullable(),
  sektor: z.string().nullable(),
  email: z.string().email("Email tidak valid"),
  saran: z.string().nullable(),
  source_url: z.string().optional(),
  source_access: z.string().optional(),
  notes: z.string().optional(),
  gender: z.number().min(0).max(1),
  id: z.string().optional(),
  datetime: z
    .date()
    .default(() => new Date())
    .optional(),
});

export type FeedbackFormValues = z.infer<typeof feedbackSchema>;
