import type { DevToolbarCategory, DevToolbarIssue, DevToolbarSeverity } from "../types.ts";

export interface DevToolbarRuleContext {
  document: Document;
  window: Window;
  url: URL;
  root: ParentNode;
  performanceEntries: PerformanceEntry[];
  config?: Record<string, unknown>;
}

export interface DevToolbarRule {
  id: string;
  category: DevToolbarCategory;
  defaultSeverity: DevToolbarSeverity;
  description: string;
  run(context: DevToolbarRuleContext): DevToolbarIssue[] | Promise<DevToolbarIssue[]>;
}
