/** * ➡️ 경로 : 하수관망도 메인페이지 내 침수심 범례 * * 📄 WaterDepth Component * 침수심 범례 컴포넌트 * * - 침수심 레이어의 범례 표시 및 애니메이션 재생 제어 * - 진행률 바를 통한 애니메이션 상태 시각화 * - 플레이/일시정지 버튼을 통한 사용자 상호작용 * - 범례 항목별 색상과 레이블 표시 */ "use client"; import { Label } from "@common/components/ui/label"; import { useEffect } from "react"; export const WATER_DEPTH_LAYER_TYPES: string[] = [ 'tb_ms_flood_dngr_map', 'tb_ms_sbmrg_dngr_map' ]; interface WaterDepthProps { onClose?: () => void; isPlaying: boolean; setIsPlaying: (isPlaying: boolean) => void; totalSteps?: number; currentStep?: number; } export function WaterDepth({ onClose, isPlaying, setIsPlaying, totalSteps = 0, currentStep = 0, }: WaterDepthProps) { useEffect(() => { if (setIsPlaying) setIsPlaying(isPlaying); }, [isPlaying, setIsPlaying]); const handlePlayToggle = () => { setIsPlaying(!isPlaying); }; // 진행률 계산 (0-100%) const progressPercentage = totalSteps > 0 ? (currentStep / totalSteps) * 100 : 100; return ( <>
침 수 심
{/* 코드: N330 */} {/* 코드: N331 */} {/* 코드: N332 */} {/* 코드: N333 */} {/* 코드: N334 */}
); } function LegendItem({ color, label }: { color: string; label: string }) { return (
{label}
); }