import { type Component, type JSX, createSignal, Show } from "solid-js"; import { Sidebar, BottomNav } from "./Navigation"; import { QuickEntry } from "./QuickEntry"; import { TaskDetail } from "./TaskDetail"; import { store, activeTaskId, setActiveTaskId } from "@/store"; import { PanelLeftOpen } from "lucide-solid"; import { Button } from "./ui/button"; import { cn } from "@/lib/utils"; interface LayoutProps { children: JSX.Element; currentView: string; setView: (v: string) => void; } export const Layout: Component = (props) => { const [isSidebarLocked, setIsSidebarLocked] = createSignal(true); const [isSidebarPeeking, setIsSidebarPeeking] = createSignal(false); // Derived active task for the detail view const activeTask = () => store.tasks.find(t => t.id === activeTaskId()); return (
{/* Expand Trigger Button (visible when not locked) */} {!isSidebarLocked() && ( )}
{props.children}
{/* Mobile Bottom Nav */}
setActiveTaskId(null)} />
); };