import { Button, Popover, PopoverContent, PopoverTrigger, useIsMobile, } from "@methanium/ui"; import { ArrowLeft, House, Phone, Settings, User } from "lucide-react"; import { useLocation, useNavigate, useSearch } from "@tanstack/react-router"; import { joinCall, useCall } from "@tensamin/call/store"; import Wrapper from "@tensamin/user/wrapper"; import { Skeleton } from "@methanium/ui"; import { Select, SelectContent, SelectItem, SelectTrigger, } from "@methanium/ui"; import { displayCallId } from "@tensamin/call/utils"; import { useState } from "react"; import { SidebarTrigger, useSidebar } from "@methanium/ui"; import { WindowControls as Controls } from "@methanium/ui"; import { useSession } from "@tensamin/storage/session"; import Profile from "./modals/profile"; export default function Navbar({ forMobile }: { forMobile: boolean }) { const navigate = useNavigate(); const callState = useCall((state) => state.state); const { calls } = useSession(); const { pathname } = useLocation(); const { id } = useSearch({ strict: false }); const currentCalls = calls.filter((call) => call.CallMembers.some((member) => member === id), ); const isMobile = useIsMobile(); const [userInfoOpen, setUserInfoOpen] = useState(false); return (
{forMobile ? ( ( )} /> ) : ( <> )} {pathname === "/chat" && id && ( isMobile ? (

{user?.Display}

) : ( ( )} /> ) } loading={} /> )}
{/* Empty space */}
{pathname === "/chat" && id && ( <> {currentCalls.length === 0 ? ( ) : currentCalls.length === 1 ? ( ) : ( <> )} )}
); } export function MobileNavbar() { const navigate = useNavigate(); const { setOpenMobile } = useSidebar(); return (

Chats

); }