export type PaymentMethod = "paypal" | "cod";
export type PaymentStatus = "pending" | "paid" | "failed" | "refunded" | "cancelled";
export type OrderStatus =
  | "awaiting_payment"
  | "awaiting_confirmation"
  | "confirmed"
  | "completed"
  | "cancelled"
  | "refunded";
export type RefundStatus = "requested" | "approved" | "rejected" | "processed";

export interface BuyerInfo {
  name: string;
  email: string;
  phone: string;
  address: string;
  city: string;
  pincode: string;
}

export interface PaymentOrder {
  id: string;
  listingId: string;
  listingSlug: string;
  listingTitle: string;
  listingImage: string;
  listingCondition: string;
  sellerId: string;
  sellerName: string;
  sellerAvatar: string;
  sellerVerified: boolean;
  buyerId: string;
  buyerInfo: BuyerInfo;
  quantity: number;
  listingPrice: number;
  serviceFee: number;
  deliveryFee: number;
  discount: number;
  tax: number;
  totalAmount: number;
  paymentMethod: PaymentMethod;
  paymentStatus: PaymentStatus;
  orderStatus: OrderStatus;
  transactionId?: string;
  paypalOrderId?: string;
  createdAt: string;
  updatedAt: string;
  refundStatus?: RefundStatus;
  refundReason?: string;
  failureReason?: string;
}

export interface MonthlyEarning {
  month: string;
  amount: number;
  orders: number;
}

export interface SellerStats {
  totalEarnings: number;
  pendingAmount: number;
  completedAmount: number;
  refundedAmount: number;
  totalOrders: number;
  averageOrderValue: number;
  monthlyData: MonthlyEarning[];
}
