import React, { useState, useEffect } from 'react'; import { AlertTriangle, Siren } from 'lucide-react'; import { Machine3D } from '../components/Machine3D'; import { SettingsModal } from '../components/SettingsModal'; import { InitializeModal } from '../components/InitializeModal'; import { RecipePanel } from '../components/RecipePanel'; import { MotionPanel } from '../components/MotionPanel'; import { CyberPanel } from '../components/common/CyberPanel'; import { ModelInfoPanel } from '../components/ModelInfoPanel'; import { ProcessedDataPanel } from '../components/ProcessedDataPanel'; import { VisionDataPanel } from '../components/VisionDataPanel'; import { SystemStatusPanel } from '../components/SystemStatusPanel'; import { EventLogPanel } from '../components/EventLogPanel'; import { SystemState, Recipe, IOPoint, LogEntry, RobotTarget, ConfigItem } from '../types'; interface HomePageProps { systemState: SystemState; currentRecipe: Recipe; robotTarget: RobotTarget; logs: LogEntry[]; ioPoints: IOPoint[]; doorStates: { front: boolean; right: boolean; left: boolean; back: boolean }; isLowPressure: boolean; isEmergencyStop: boolean; isHostConnected: boolean; activeTab: 'recipe' | 'motion' | 'camera' | 'setting' | 'initialize' | null; onSelectRecipe: (r: Recipe) => void; onMove: (axis: 'X' | 'Y' | 'Z', val: number) => void; onControl: (action: 'start' | 'stop' | 'reset') => void; onSaveConfig: (config: ConfigItem[]) => void; onCloseTab: () => void; videoRef: React.RefObject; } export const HomePage: React.FC = ({ systemState, currentRecipe, robotTarget, logs, ioPoints, doorStates, isLowPressure, isEmergencyStop, isHostConnected, activeTab, onSelectRecipe, onMove, onControl, onSaveConfig, onCloseTab, videoRef }) => { return (
{/* 3D Canvas (Background Layer) */}
{/* Center Alarms */}
{!isHostConnected && !isEmergencyStop && (

HOST DISCONNECTED

WAITING FOR CONNECTION...

PLEASE CHECK THE HANDLER PROGRAM

)} {isEmergencyStop && (

EMERGENCY STOP

SYSTEM HALTED - RELEASE TO RESET

)} {isLowPressure && !isEmergencyStop && isHostConnected && (
LOW AIR PRESSURE WARNING
)}
{/* Floating Panel (Left) */} {activeTab === 'motion' && (
)} {/* Recipe Selection Modal */} {/* Settings Modal */} {/* Initialize Modal */} {/* Right Sidebar (Dashboard) */}
{/* Left - Vision Data Panel (Recognized Data) - 세로 공간 최대 사용 */}
{/* Bottom Docked - Processed Data Panel (우측 사이드바 피함) */}
); };