import type {
  OrderAllChannelFilter,
  OrderAllDetailDto,
  OrderAllListItemDto,
  OrderAllPaymentFilter,
  OrderAllStatsDto,
  OrderAllStatusFilter,
} from '#/api/order';

export interface OrderAllFilterState {
  channel: OrderAllChannelFilter;
  endDate: string;
  keyword: string;
  paymentMethod: OrderAllPaymentFilter;
  startDate: string;
  status: OrderAllStatusFilter;
}

export interface OrderAllPaginationState {
  page: number;
  pageSize: number;
  total: number;
}

export interface OrderAllPageState {
  detail: null | OrderAllDetailDto;
  filters: OrderAllFilterState;
  isDetailLoading: boolean;
  isDrawerOpen: boolean;
  isExporting: boolean;
  isListLoading: boolean;
  isStatsLoading: boolean;
  rows: OrderAllListItemDto[];
  stats: OrderAllStatsDto;
}

export interface OptionItem {
  label: string;
  value: string;
}

export interface OrderAllQueryPayload {
  channel?: OrderAllChannelFilter;
  endDate?: string;
  keyword?: string;
  page: number;
  pageSize: number;
  paymentMethod?: OrderAllPaymentFilter;
  startDate?: string;
  status?: OrderAllStatusFilter;
  storeId: string;
}
