import { useState } from 'react' import type { BoomLine, BoomLineCoord, AlgorithmSettings, ContainmentResult } from '@common/types/boomLine' import { generateAIBoomLines, runContainmentAnalysis, computePolylineLength, computeBearing } from '@common/utils/geo' interface OilBoomSectionProps { expanded: boolean onToggle: () => void boomLines: BoomLine[] onBoomLinesChange: (lines: BoomLine[]) => void oilTrajectory: Array<{ lat: number; lon: number; time: number; particle?: number }> incidentCoord: { lon: number; lat: 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 } const OilBoomSection = ({ expanded, onToggle, boomLines, onBoomLinesChange, oilTrajectory, incidentCoord, algorithmSettings, onAlgorithmSettingsChange, isDrawingBoom, onDrawingBoomChange, drawingPoints, onDrawingPointsChange, containmentResult, onContainmentResultChange, }: OilBoomSectionProps) => { const [boomPlacementTab, setBoomPlacementTab] = useState<'ai' | 'manual' | 'simulation'>('simulation') return (
{oilTrajectory.length > 0 ? 'ํ์ฐ ๊ถค์ ์ ๋ถ์ํ์ฌ ํด๋ฅ ์ง๊ต ๋ฐฉํฅ 1์ฐจ ๋ฐฉ์ด์ , Uํ ํฌ์ 2์ฐจ ๋ฐฉ์ด์ , ์ฐ์ ๋ณดํธ 3์ฐจ ๋ฐฉ์ด์ ์ ์๋ ์์ฑํฉ๋๋ค.' : '์๋จ์์ ํ์ฐ ์์ธก์ ์คํํ ๋ค AI ๋ฐฐ์น๋ฅผ ์ ์ฉํ ์ ์์ต๋๋ค.' }
๋ฐฐ์น๋ ์ค์ผํ์ค ๋ผ์ธ์ด ์์ต๋๋ค.
) : ( boomLines.map((line, idx) => (