// [DEF:DashboardTypes:Module]
/**
 * @TIER: TRIVIAL
 * @PURPOSE: TypeScript interfaces for Dashboard entities
 * @LAYER: Domain
 */
export interface DashboardMetadata {
  id: number;
  title: string;
  slug?: string;
  dashboard_slug?: string;
  url_slug?: string;
  url?: string;
  last_modified: string;
  status: string;
}

export interface DashboardSelection {
  selected_ids: number[];
  source_env_id: string;
  target_env_id: string;
  replace_db_config?: boolean;
  fix_cross_filters?: boolean;
}

export interface DiffObjectRef {
  uuid: string;
  title?: string;
  target_title?: string;
}

export interface DiffBucket {
  create: DiffObjectRef[];
  update: DiffObjectRef[];
  delete: DiffObjectRef[];
}

export interface DryRunRiskItem {
  code: string;
  severity: "low" | "medium" | "high";
  object_type: string;
  object_uuid: string;
  message: string;
}

export interface MigrationDryRunResult {
  generated_at: string;
  selection: DashboardSelection;
  selected_dashboard_titles: string[];
  diff: {
    dashboards: DiffBucket;
    charts: DiffBucket;
    datasets: DiffBucket;
  };
  summary: {
    dashboards: Record<"create" | "update" | "delete", number>;
    charts: Record<"create" | "update" | "delete", number>;
    datasets: Record<"create" | "update" | "delete", number>;
    selected_dashboards: number;
  };
  risk: {
    score: number;
    level: "low" | "medium" | "high";
    items: DryRunRiskItem[];
  };
}
// [/DEF:DashboardTypes:Module]
