import { Sidebar } from './Sidebar';
import { MiddlePanel } from './MiddlePanel';
import { useAppStore } from '@/store';

export function AppLayout({ children }: { children: React.ReactNode }) {
  const activeView = useAppStore((s) => s.activeView);

  return (
    <div className="h-screen flex bg-zinc-950 text-zinc-50 overflow-hidden">
      <Sidebar />
      {activeView === 'chat' && <MiddlePanel />}
      <main className="flex-1 flex flex-col min-w-0">
        {children}
      </main>
    </div>
  );
}
