import { z } from "zod";

export const createShoppingListSchema = z.object({
  householdId: z.string().min(1),
  name: z.string().min(1).max(100),
});

export const createShoppingListItemSchema = z.object({
  listId: z.string().min(1),
  name: z.string().min(1).max(200),
  quantity: z.string().optional(),
  unit: z.string().max(20).optional(),
});

export const updateShoppingListItemSchema = z.object({
  name: z.string().min(1).max(200).optional(),
  quantity: z.string().optional(),
  unit: z.string().max(20).optional(),
  isChecked: z.boolean().optional(),
});

export type CreateShoppingListInput = z.infer<typeof createShoppingListSchema>;
export type CreateShoppingListItemInput = z.infer<typeof createShoppingListItemSchema>;
export type UpdateShoppingListItemInput = z.infer<typeof updateShoppingListItemSchema>;
