import { useNavigate, useLocation, matchPath } from "react-router-dom"; import { usePlayerStore } from "../stores/playerStore"; // ── Icons (inline SVG) ────────────────────────────────────────────────────── function IconLibrary() { return ( ); } function IconPlay() { return ( ); } function IconSettings() { return ( ); } function IconMembers() { return ( ); } // ── NavItem ───────────────────────────────────────────────────────────────── interface NavItemProps { icon: React.ReactNode; label: string; active: boolean; onClick: () => void; disabled?: boolean; } function NavItem({ icon, label, active, onClick, disabled }: NavItemProps) { const color = active ? "#e8a22a" : "rgba(255,255,255,0.5)"; return ( ); } // ── BottomNavBar ──────────────────────────────────────────────────────────── export function BottomNavBar() { const navigate = useNavigate(); const location = useLocation(); // Derive current band from URL const bandMatch = matchPath("/bands/:bandId/*", location.pathname) ?? matchPath("/bands/:bandId", location.pathname); const currentBandId = bandMatch?.params?.bandId || location.state?.fromBandId; // Debug logging for black screen issue console.log("BottomNavBar - Current band ID:", currentBandId, "Path:", location.pathname, "State:", location.state); // Derive active states const isLibrary = !!matchPath("/bands/:bandId", location.pathname) || !!matchPath("/bands/:bandId/sessions/:sessionId", location.pathname); const isSettings = location.pathname.startsWith("/settings"); // Player state const { currentSongId, currentBandId: playerBandId, isPlaying } = usePlayerStore(); const hasActiveSong = !!currentSongId && !!playerBandId; return ( ); }