export type OrderStatus =
  | 'novo'
  | 'aguardando_pagamento'
  | 'pago'
  | 'em_separacao'
  | 'enviado'
  | 'entregue'
  | 'cancelado';

export type PaymentStatus =
  | 'pendente'
  | 'pago'
  | 'recusado'
  | 'cancelado'
  | 'estornado';

export type PaymentMethod = 'pix' | 'cartao' | 'boleto' | 'na_entrega';
export type ShippingMethod = 'correios' | 'retirada' | 'entrega_local';

export interface OrderItem {
  productId: string;
  productName: string;
  variationLabel?: string;
  quantity: number;
  unitPrice: number;
  total: number;
  imageUrl?: string;
}

export interface OrderHistoryEntry {
  status: OrderStatus;
  date: string;
  note?: string;
}

export interface Order {
  id: string;
  storeId: string;
  number: string;
  customerId: string;
  customerName: string;
  customerEmail: string;
  customerPhone: string;
  items: OrderItem[];
  subtotal: number;
  discount: number;
  shipping: number;
  total: number;
  couponCode?: string;
  status: OrderStatus;
  paymentStatus: PaymentStatus;
  paymentMethod: PaymentMethod;
  shippingMethod: ShippingMethod;
  shippingAddress: string;
  notes?: string;
  history: OrderHistoryEntry[];
  createdAt: string;
}
