import { type ComponentType, type ReactNode } from "react";
import type { LucideProps } from "lucide-react";

export type NavigationId = "scan" | "triage" | "builds" | "overlay";

export interface AppNavigationItem {
  id: NavigationId;
  label: string;
  icon: ComponentType<LucideProps>;
  disabled?: boolean;
  disabledReason?: string;
}

export interface AppSidebarItemAction extends AppNavigationItem {
  onSelect: () => void;
}

export interface AppMetricCard {
  label: string;
  value: number;
  detail: string;
}

export interface AppBarAction {
  id: string;
  icon?: ReactNode;
  label: string;
  disabled?: boolean;
  onAction: () => void;
  title?: string;
}

export interface AppSidebarProps {
  activeView: NavigationId;
  items: AppNavigationItem[];
  onSelect: (id: NavigationId) => void;
}

export interface AppTopbarProps {
  topbarStatus: string;
  canExportGood: boolean;
  canShowOverlay: boolean;
  isScanning: boolean;
  artifactCount: number;
  onExportGood: () => Promise<void> | void;
  onShowOverlay: () => Promise<void>;
  onDemoScan: () => void;
  exportIcon?: ReactNode;
  overlayIcon?: ReactNode;
  demoIcon?: ReactNode;
}

export interface AppMetricsProps {
  metricCards: AppMetricCard[];
}

export interface AppShellProps {
  sidebar: ReactNode;
  children: ReactNode;
}
