import type {
  PagerType,
  ShipmentAddressType,
} from "@/pages/orders/types/Types";

export type ReturnOrderItemType = {
  quantity: number;
  comment: string;
  reason: string;
  _id: string;
  orderItem: {
    _id: string;
    totalSellingPrice: number;
  };
};

export type ReturnOrderEmbeddedOrderType = {
  _id: number;
  user: string;
  payment: string;
  shipmentAddress: ShipmentAddressType;
  orderStatus: string;
  createdAt: string;
  updatedAt: string;
  __v: number;
};

export type ReturnOrderType = {
  _id: string;
  order: ReturnOrderEmbeddedOrderType;
  status: "Pending" | "Approved" | "Rejected" | string;
  total_price: number;
  createdAt: string;
  updatedAt: string;
  returnOrderItems: ReturnOrderItemType;
  shopName: string;
};

export type ReturnOrdersResponseType = {
  status: number;
  success: boolean;
  results: {
    pager: PagerType;
    returnsOrders: ReturnOrderType[];
  };
};

export type AddTrackCodeType = {
  trackCode: string;
  postingDate: string;
  postingReceipt: string;
  orderId: string;
};

export type CompleteReturnType = {
  refundDate: string;
  refundComment: string;
  refundReceipt: string;
};
