export interface SalesSummary {
  total_sales: number;
  total_orders: number;
  total_items: number;
  average_order_value: number;
  total_tax: number;
  total_discount: number;
  net_sales: number;
}

export interface SalesDataItem {
  date: string; // ISO string, e.g., "2025-08-03T00:00:00Z"
  sales: number;
  orders: number;
  items: number;
  tax: number;
  discount: number;
  net_sales: number;
}

export interface SalesReport {
  organization_id: string;
  outlet_id: string;
  date_from: string; // ISO string with timezone, e.g., "2025-08-01T00:00:00+07:00"
  date_to: string;   // ISO string with timezone
  group_by: string;  // e.g., "day", "month", etc.
  summary: SalesSummary;
  data: SalesDataItem[];
}

export interface ProductData {
  product_id: string
  product_name: string
  category_id: string
  category_name: string
  quantity_sold: number
  revenue: number
  average_price: number
  order_count: number
}

export interface ProductSalesReport {
  organization_id: string
  outlet_id: string
  date_from: string
  date_to: string
  data: ProductData[]
}
