import React from 'react' import { Play, Pause, X } from 'lucide-react' import { usePlayerStore } from '../../store/playerStore' import CoverImage from '../common/CoverImage' import { coverUrl } from '../../api/items' export default function MiniPlayer() { const { item, currentTime, duration, isPlaying, setPlaying, stop, setExpanded } = usePlayerStore() if (!item) return null const meta = item.media?.metadata || {} const title = meta.title || item.relPath || '' const author = meta.authors?.[0]?.name || '' const pct = duration > 0 ? (currentTime / duration) * 100 : 0 return (
{/* Progress track */}
{/* 3-column grid */}
{/* Left: cover + title */}
setExpanded(true)} >

{title}

{author &&

{author}

}
{/* Center: play/pause */} {/* Right: close */}
) }