import { z } from 'zod';
import { Product } from './product.schema';

const ReceiptItemSchema = z.object({
  id: z.number().describe('Unique identifier'),
});

export const ReturnReceiptValuesSchema = z.object({
  quantity: z.number().describe('Quantity'),
  category: z.string().describe('Category information').optional(),
  comment: z.string().describe('Comment text').optional(),
  itemCondition: z.string().describe('Item condition').optional(),
  returnDetails: z.string().describe('Return details').optional(),
  returnReason: z.string().describe('Return reason').optional(),
  receiptItem: ReceiptItemSchema.describe('Receipt item'),
  otherProduct: z.custom<Product>().describe('Other product').optional(),
});

export type ReturnReceiptValues = z.infer<typeof ReturnReceiptValuesSchema>;
