import { z } from 'zod';

export const openReturnSchema = z.object({
  purchaseId: z.uuid(),
  reason: z.enum([
    'defective',
    'damaged_in_transit',
    'not_as_described',
    'wrong_item_received',
    'changed_mind',
    'wrong_size',
    'arrived_late',
    'other',
  ]),
  reasonNote: z.string().max(1000).optional(),
  uploadSessionId: z.uuid().optional(),
  photoCount: z.number().int().min(0).max(6),
});

export const trackingSchema = z.object({
  carrier: z.enum(['israel-post', 'yamit', 'cheetah', 'other']),
  trackingNumber: z.string().min(3).max(64),
});

export const denySchema = z.object({ reason: z.string().min(3).max(500) });
export const inspectDisputeSchema = z.object({ reason: z.string().min(3).max(500) });
