import type { PredictionModel } from './OilSpillView';
import type {
  BoomLine,
  BoomLineCoord,
  AlgorithmSettings,
  ContainmentResult,
} from '@common/types/boomLine';
import type { Analysis } from './AnalysisListTable';
import type { ImageAnalyzeResult, SensitiveResourceCategory } from '../services/predictionApi';

export interface LeftPanelProps {
  selectedAnalysis?: Analysis | null;
  enabledLayers: Set<string>;
  onToggleLayer: (layerId: string, enabled: boolean) => void;
  accidentTime: string;
  onAccidentTimeChange: (time: string) => void;
  incidentCoord: { lon: number; lat: number } | null;
  onCoordChange: (coord: { lon: number; lat: number }) => void;
  isSelectingLocation: boolean;
  onMapSelectClick: () => void;
  onRunSimulation: () => void;
  isRunningSimulation: boolean;
  selectedModels: Set<PredictionModel>;
  onModelsChange: (models: Set<PredictionModel>) => void;
  visibleModels?: Set<PredictionModel>;
  onVisibleModelsChange?: (models: Set<PredictionModel>) => void;
  hasResults?: boolean;
  predictionTime: number;
  onPredictionTimeChange: (time: number) => void;
  spillType: string;
  onSpillTypeChange: (type: string) => void;
  oilType: string;
  onOilTypeChange: (type: string) => void;
  spillAmount: number;
  onSpillAmountChange: (amount: number) => void;
  incidentName: string;
  onIncidentNameChange: (name: string) => void;
  spillUnit: string;
  onSpillUnitChange: (unit: string) => void;
  // 오일펜스 배치 관련
  boomLines: BoomLine[];
  onBoomLinesChange: (lines: BoomLine[]) => void;
  showBoomLines: boolean;
  onShowBoomLinesChange: (show: boolean) => void;
  oilTrajectory: Array<{ lat: number; lon: number; time: number; particle?: number }>;
  algorithmSettings: AlgorithmSettings;
  onAlgorithmSettingsChange: (settings: AlgorithmSettings) => void;
  isDrawingBoom: boolean;
  onDrawingBoomChange: (drawing: boolean) => void;
  drawingPoints: BoomLineCoord[];
  onDrawingPointsChange: (points: BoomLineCoord[]) => void;
  containmentResult: ContainmentResult | null;
  onContainmentResultChange: (result: ContainmentResult | null) => void;
  // 레이어 스타일
  layerOpacity: number;
  onLayerOpacityChange: (val: number) => void;
  layerBrightness: number;
  onLayerBrightnessChange: (val: number) => void;
  layerColors: Record<string, string>;
  onLayerColorChange: (layerId: string, color: string) => void;
  // 영향 민감자원
  sensitiveResources?: SensitiveResourceCategory[];
  // 이미지 분석 결과 콜백
  onImageAnalysisResult?: (result: ImageAnalyzeResult) => void;
  // 사고 리스트 선택 시 지도 이동 콜백
  onFlyToCoord?: (coord: { lon: number; lat: number }) => void;
  // 유효성 검증 에러 필드
  validationErrors?: Set<string>;
}

export interface ExpandedSections {
  predictionInput: boolean;
  incident: boolean;
  impactResources: boolean;
  infoLayer: boolean;
  oilBoom: boolean;
}
