"use client"; import { Disc3, Music, SkipForward, Square } from "lucide-react"; import { useMediaPlayer } from "@/lib/hooks/use-media-player"; export function MiniPlayer() { const { playing, current, queue, pending, skip, stop } = useMediaPlayer(); // Nothing to show if no track is playing and nothing is queued if (!current && queue.length === 0) return null; return (
{/* Track info */}
{playing ? ( ) : ( )}

{current?.title ?? "Unknown track"}

{queue.length > 0 && (

{queue.length > 1 ? `${queue.length} in queue` : "1 in queue"}

)}
{/* Controls */}
{playing && ( )} {current && ( )}
); }