import React from 'react'; import { useNavigate, useLocation } from 'react-router-dom'; import { Activity, Settings, Move, Camera, Layers, Cpu, Target } from 'lucide-react'; interface HeaderProps { currentTime: Date; onTabChange: (tab: 'recipe' | 'motion' | 'camera' | 'setting' | 'initialize' | null) => void; activeTab: 'recipe' | 'motion' | 'camera' | 'setting' | 'initialize' | null; } export const Header: React.FC = ({ currentTime, onTabChange, activeTab }) => { const navigate = useNavigate(); const location = useLocation(); const isWebView = typeof window !== 'undefined' && !!window.chrome?.webview; const isIOPage = location.pathname === '/io-monitor'; return (
{ navigate('/'); onTabChange(null); }} >

EQUI-HANDLER PRO

SYS.VER 4.2.0 | LINK: {isWebView ? "NATIVE" : "SIMULATION"}
{/* Top Navigation */}
{/* IO Tab Switcher (only on IO page) */}
{[ { id: 'recipe', icon: Layers, label: 'RECIPE', path: '/' }, { id: 'io', icon: Activity, label: 'I/O MONITOR', path: '/io-monitor' }, { id: 'motion', icon: Move, label: 'MOTION', path: '/' }, { id: 'camera', icon: Camera, label: 'VISION', path: '/' }, { id: 'setting', icon: Settings, label: 'CONFIG', path: '/' }, { id: 'initialize', icon: Target, label: 'INITIALIZE', path: '/' } ].map(item => { const isActive = item.id === 'io' ? location.pathname === '/io-monitor' : activeTab === item.id; return ( ); })}
{currentTime.toLocaleTimeString('en-GB')}
{currentTime.toLocaleDateString().toUpperCase()}
); };