// Seller Types
export interface SellerDocument {
  _id: string;
  seller: string;
  type: string;
  __v: number;
  comment: string | null;
  createdAt: string;
  docsUrl: string;
  status: "Approved" | "Pending";
  updatedAt: string;
}

export interface ShopRate {
  totalRate: number;
  totalCount: number;
  onTimeShip: number;
  returns: number;
  cancel: number;
}

export interface Shop {
  _id: string;
  shopName: string | null;
  shopDescription: string | null;
  telephoneNumber: string | null;
  shopPostalCode: string | null;
  address: string | null;
  logo: string | null;
  rate: ShopRate;
  shipmentMethod: number[];
  isChatActive: boolean;
  owner: string;
  ownerRef: string;
  createdAt: string;
  updatedAt: string;
  shopCode: number;
  __v: number;
}

export interface Contract {
  _id: string;
  content: string;
  seller: string;
  contractNumber: string;
  signed: boolean;
  singedAt: string;
  createdAt: string;
  updatedAt: string;
  __v: number;
}

export interface Seller {
  _id: string;
  fullName: string;
  dateOfBirth: string | null;
  phoneNumber: string;
  accountStatus: "Pending" | "Approved";
  isRegisterCompleted: boolean;
  businessType: string | null;
  isWholesaler: boolean;
  createdAt: string;
  updatedAt: string;
  __v: number;
  email?: string;
  documents?: SellerDocument[];
  shop: Shop;
  contracts?: Contract;
}

export interface Pager {
  page: number;
  limit: number;
  totalItems: number;
  totalPages: number;
  prevPage: boolean | null;
  nextPage: string | null;
}

export interface SellersResponse {
  status: number;
  success: boolean;
  results: {
    sellers: Seller[];
    pager: Pager;
  };
}

export interface WholesaleRequest {
  _id: string;
  seller: {
    _id: string;
    fullName: string;
    dateOfBirth: string;
    phoneNumber: string;
    accountStatus: "Pending" | "Approved";
    isRegisterCompleted: boolean;
    businessType: string;
    isWholesaler: boolean;
    createdAt: string;
    updatedAt: string;
    email: string;
  };
  shop: Shop;
  status: "Pending" | "Approved";
  createdAt: string;
  updatedAt: string;
}

export interface WholesaleRequestsResponse {
  status: number;
  success: boolean;
  results: {
    requests: WholesaleRequest[];
    pager: {
      page: number;
      limit: number;
      totalItems: number;
      totalPages: number;
      prevPage: boolean;
      nextPage: boolean;
    };
  };
}

export interface WalletSeller {
  _id: string;
  fullName: string;
  dateOfBirth: string | null;
  phoneNumber: string;
  accountStatus: "Pending" | "Approved";
  isRegisterCompleted: boolean;
  businessType: string | null;
  isWholesaler: boolean;
  createdAt: string;
  updatedAt: string;
  email?: string;
}

export interface Wallet {
  _id: string;
  seller: WalletSeller;
  balance: number;
  createdAt: string;
  updatedAt: string;
}

export interface WithdrawalRequest {
  wallet: Wallet;
  withdrawals: unknown[]; // Empty array in example, can be expanded later
  lastPaidAmount: number | null;
  lastPaidDate: string | null;
}

export interface WithdrawalRequestsResponse {
  status: number;
  success: boolean;
  results: {
    walletData: WithdrawalRequest[];
  };
}
