import type React from 'react';
import type { AggregateItem, PluginDataRecord } from '../../api/pluginData';
import type { DashboardWidget, StatCardDef, ActionQueryDef } from '../../api/plugins';

// ── 类型定义 ──

export interface EntityStat {
  name: string;
  displayName: string;
  count: number;
  icon: React.ReactNode;
  gradient: string;
  iconBg: string;
}

export interface FieldBreakdown {
  fieldName: string;
  displayName: string;
  items: AggregateItem[];
}

export interface WidgetData {
  widget: DashboardWidget;
  data: AggregateItem[];
  count?: number;
  records?: PluginDataRecord[];
  statCards?: { card: StatCardDef; value: number }[];
  actionItems?: { query: ActionQueryDef; records: PluginDataRecord[] }[];
}
