import { GroupingConfig } from './ViewConfig';

export interface IRenderContext {
  headerContainer: HTMLElement;
  columnContainer: HTMLElement;
  filter: Record<string, string[]>;  // { team: ['alpha'], resource: ['alice', 'bob'], date: [...] }
  groupings?: GroupingConfig[];      // Full grouping configs (for hideHeader etc.)
  parentChildMap?: Record<string, string[]>;  // { team1: ['EMP001', 'EMP002'], team2: ['EMP003', 'EMP004'] }
  childType?: string;  // The type of the child grouping (e.g., 'resource' when team has belongsTo)
}

export interface IRenderer {
  readonly type: string;
  render(context: IRenderContext): void | Promise<void>;
}
