import { useMemo, useState } from 'react' import { Dialog, DialogBackdrop, DialogPanel, TransitionChild } from '@headlessui/react' import classNames from '~/lib/classNames' import { IconArrowLeft, IconBug } from '@tabler/icons-react' import { usePage } from '@inertiajs/react' import { UsePageProps } from '../../types/system' import { IconMenu2, IconX } from '@tabler/icons-react' import ThemeToggle from '~/components/ThemeToggle' import DebugInfoModal from './DebugInfoModal' type SidebarItem = { name: string href: string icon?: React.ElementType current: boolean target?: string } interface StyledSidebarProps { title: string items: SidebarItem[] } const StyledSidebar: React.FC = ({ title, items }) => { const [sidebarOpen, setSidebarOpen] = useState(false) const [debugModalOpen, setDebugModalOpen] = useState(false) const { appVersion } = usePage().props as unknown as UsePageProps const currentPath = useMemo(() => { if (typeof window === 'undefined') return '' return window.location.pathname }, []) const ListItem = (item: SidebarItem) => { return (
  • {item.icon &&
  • ) } const Sidebar = () => { return (
    Project Nomad Logo

    {title}

    Project N.O.M.A.D. Command Center v{appVersion}

    ) } return ( <> {/* Mobile sidebar */}
    {/* Desktop sidebar */}
    setDebugModalOpen(false)} /> ) } export default StyledSidebar