import React from 'react'; import { Header } from './Header'; import { Footer } from './Footer'; import { RobotTarget } from '../../types'; import { useTheme } from '../../contexts/ThemeContext'; interface LayoutProps { children: React.ReactNode; currentTime: Date; isHostConnected: boolean; robotTarget: RobotTarget; onTabChange: (tab: 'recipe' | 'motion' | 'camera' | 'setting' | 'initialize' | null) => void; activeTab: 'recipe' | 'motion' | 'camera' | 'setting' | 'initialize' | null; isLoading: boolean; } export const Layout: React.FC = ({ children, currentTime, isHostConnected, robotTarget, onTabChange, activeTab, isLoading }) => { const { theme, themeName } = useTheme(); // Theme-specific background classes const getBackgroundClass = () => { switch (themeName) { case 'windows-classic': return 'bg-[#008080]'; // Classic teal desktop case 'dark-modern': return 'bg-zinc-950'; case 'matrix': return 'bg-black'; case 'industrial': return 'bg-stone-950'; case 'otaku': return 'bg-[#1a1025]'; // Dark purple case 'pink-pink': return 'bg-[#fff0f5]'; // Lavender blush default: return 'bg-slate-950'; } }; const getTextClass = () => { switch (themeName) { case 'windows-classic': return 'text-black'; case 'pink-pink': return 'text-[#8b008b]'; // Dark magenta default: return 'text-slate-100'; } }; return (
{/* Animated Background - only for themes with effects */} {theme.effects.gridBg && ( <>
)} {/* Matrix theme special background */} {themeName === 'matrix' && (
)} {/* Industrial theme background */} {themeName === 'industrial' && (
)} {/* Dark Modern gradient */} {themeName === 'dark-modern' && (
)} {/* Otaku theme background - 다크 퍼플 그라데이션 + 별 효과 */} {themeName === 'otaku' && (
{/* 별빛 효과 */}
)} {/* Pink Pink theme background - 파스텔 핑크 그라데이션 */} {themeName === 'pink-pink' && (
{/* 하트 패턴 오버레이 */}
)} {/* Scanlines - only for themes with the effect */} {theme.effects.scanlines && (
)} {/* LOADING OVERLAY */} {isLoading && (

SYSTEM INITIALIZING

ESTABLISHING CONNECTION...

)}
{/* Main Content Area */}
{children}
); };