import type { DispersionGridResult, WeatherFetchResult } from '../utils/dispersionTypes'; import { windDirToCompass } from '../hooks/useWeatherFetch'; interface HNSRightPanelProps { dispersionResult: { zones: Array<{ level: string; color: string; radius: number; angle: number; }>; timestamp: string; windDirection: number; substance: string; concentration: { 'AEGL-3': string; 'AEGL-2': string; 'AEGL-1': string; }; } | null; computedResult?: DispersionGridResult | null; weatherData?: WeatherFetchResult | null; onOpenRecalc?: () => void; onOpenReport?: () => void; onSave?: () => void; } export function HNSRightPanel({ dispersionResult, computedResult, weatherData, onOpenRecalc, onOpenReport, onSave, }: HNSRightPanelProps) { if (!dispersionResult) { return (
๐Ÿ“Š
์˜ˆ์ธก ์‹คํ–‰ ํ›„ ๊ฒฐ๊ณผ๊ฐ€ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค
); } const area = computedResult?.aeglAreas.aegl1 ?? 0; const maxConc = computedResult?.maxConcentration ?? 0; const windSpd = weatherData?.windSpeed ?? 5.0; const windDir = weatherData?.windDirection ?? dispersionResult.windDirection; const modelLabel = computedResult?.modelType === 'plume' ? 'Gaussian Plume' : computedResult?.modelType === 'puff' ? 'Gaussian Puff' : computedResult?.modelType === 'dense_gas' ? 'Dense Gas (B-M)' : 'ALOHA'; return (
{/* Header */}

์˜ˆ์ธก ๊ฒฐ๊ณผ

{dispersionResult.substance} ยท {modelLabel}
{/* KPI Cards */}
{/* ์ตœ๋Œ€ ๋†๋„ */}
์ตœ๋Œ€ ๋†๋„
{maxConc > 0 ? maxConc.toFixed(1) : 'โ€”'}{' '} ppm
{/* ํ™•์‚ฐ ๋ฉด์  */}
AEGL-1 ํ™•์‚ฐ ๋ฉด์ 
{area > 0 ? area.toFixed(2) : 'โ€”'} kmยฒ
{/* ํ’์† */}
ํ’์†
{windSpd.toFixed(1)} m/s
{/* ํ’ํ–ฅ */}
ํ’ํ–ฅ
{windDirToCompass(windDir)} {windDir}ยฐ
{/* AEGL Zone Details */}

AEGL ๊ตฌ์—ญ ์ƒ์„ธ

{/* AEGL-3 */}
AEGL-3 (์ƒ๋ช…์œ„ํ˜‘) {computedResult?.aeglDistances.aegl3 || 0}m
{dispersionResult.concentration['AEGL-3']} {computedResult?.aeglAreas.aegl3 ?? 0} kmยฒ
{/* AEGL-2 */}
AEGL-2 (๊ฑด๊ฐ•ํ”ผํ•ด) {computedResult?.aeglDistances.aegl2 || 0}m
{dispersionResult.concentration['AEGL-2']} {computedResult?.aeglAreas.aegl2 ?? 0} kmยฒ
{/* AEGL-1 */}
AEGL-1 (๋ถˆ์พŒ๊ฐ) {computedResult?.aeglDistances.aegl1 || 0}m
{dispersionResult.concentration['AEGL-1']} {computedResult?.aeglAreas.aegl1 ?? 0} kmยฒ
{/* ์‹œ๊ฐ„ ์ •๋ณด (puff/dense_gas) */} {computedResult && computedResult.modelType !== 'plume' && (
ํ˜„์žฌ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ์‹œ๊ฐ„
t = {computedResult.timeStep}s ({(computedResult.timeStep / 60).toFixed(1)}๋ถ„)
)} {/* Timestamp */}
์˜ˆ์ธก ์‹œ๊ฐ: {new Date(dispersionResult.timestamp).toLocaleString('ko-KR')}
{/* Bottom Action Buttons */}
); }