/**
 * سفارش‌های نمونه برای صفحات پروفایل و پیگیری سفارش (فقط مرحله ۱).
 */
export type OrderStatus = "pending_payment" | "paid" | "processing" | "shipped" | "delivered" | "canceled";

export const orderStatusLabel: Record<OrderStatus, string> = {
  pending_payment: "در انتظار پرداخت",
  paid: "پرداخت شده",
  processing: "در حال آماده‌سازی",
  shipped: "تحویل به ارسال‌کننده",
  delivered: "تحویل شده",
  canceled: "لغو شده",
};

export interface SampleOrder {
  code: string;
  phone: string;
  status: OrderStatus;
  createdAt: string;
  shippingMethod: string;
  trackingCode?: string;
  items: { productId: number; variantId: string; qty: number; price: number }[];
  shippingCost: number;
  discount: number;
  history: { status: OrderStatus; at: string }[];
}

export const sampleOrders: SampleOrder[] = [
  {
    code: "ZH-1405-10421",
    phone: "09120000000",
    status: "shipped",
    createdAt: "2026-10-23T08:20:00Z",
    shippingMethod: "تیپاکس",
    trackingCode: "TPX-88213047",
    items: [
      { productId: 1, variantId: "v-1-1", qty: 1, price: 1_450_000 },
      { productId: 8, variantId: "v-8-1", qty: 1, price: 690_000 },
    ],
    shippingCost: 0,
    discount: 0,
    history: [
      { status: "paid", at: "2026-10-23T08:21:00Z" },
      { status: "processing", at: "2026-10-23T12:00:00Z" },
      { status: "shipped", at: "2026-10-24T09:30:00Z" },
    ],
  },
  {
    code: "ZH-1405-09877",
    phone: "09120000000",
    status: "delivered",
    createdAt: "2026-09-30T16:05:00Z",
    shippingMethod: "پست پیشتاز",
    trackingCode: "POST-2215098811",
    items: [
      { productId: 13, variantId: "v-13-2", qty: 2, price: 480_000 },
      { productId: 18, variantId: "v-18-1", qty: 1, price: 540_000 },
    ],
    shippingCost: 85_000,
    discount: 150_000,
    history: [
      { status: "paid", at: "2026-09-30T16:06:00Z" },
      { status: "processing", at: "2026-10-01T09:00:00Z" },
      { status: "shipped", at: "2026-10-01T15:00:00Z" },
      { status: "delivered", at: "2026-10-04T11:40:00Z" },
    ],
  },
  {
    code: "ZH-1405-11102",
    phone: "09120000000",
    status: "processing",
    createdAt: "2026-10-26T19:45:00Z",
    shippingMethod: "پیک تهران",
    items: [{ productId: 24, variantId: "v-24-1", qty: 1, price: 3_400_000 }],
    shippingCost: 0,
    discount: 0,
    history: [
      { status: "paid", at: "2026-10-26T19:46:00Z" },
      { status: "processing", at: "2026-10-27T08:00:00Z" },
    ],
  },
];
