import type { MouseEvent as ReactMouseEvent } from 'react' import { useAppDispatch, useAppSelector } from '../store' import { selectPlayingOrigIdx, selectQueueItems, selectQueueOrder, selectQueueScrollSignal, selectRepeatAll, selectShuffle, toggleRepeat, toggleShuffle, } from '../store/slices/queueSlice' import { Breadcrumbs } from './Breadcrumbs' import { LibraryList } from './LibraryList' import { QueueList } from './QueueList' export type Crumb = { label: string; action?: () => void } export type LibraryListItem = { key: string className: string icon: string name: string detail?: string nameClassName?: string onClick: () => void button?: { title: string; onClick: (ev: ReactMouseEvent) => void } } type MainPanelProps = { breadcrumbs: Crumb[] libraryLoading: boolean libraryError: string | null libraryItems: LibraryListItem[] onQueuePlay: (origIdx: number) => void onQueueRemove: (origIdx: number) => void onQueueMove: (fromPos: number, toPos: number) => void onClearQueue: () => void } export function MainPanel({ breadcrumbs, libraryLoading, libraryError, libraryItems, onQueuePlay, onQueueRemove, onQueueMove, onClearQueue, }: MainPanelProps) { const dispatch = useAppDispatch() const queueItemsView = useAppSelector(selectQueueItems) const queueOrderView = useAppSelector(selectQueueOrder) const queuePlayingOrigIdxView = useAppSelector(selectPlayingOrigIdx) const queueScrollSignal = useAppSelector(selectQueueScrollSignal) const shuffle = useAppSelector(selectShuffle) const repeatAll = useAppSelector(selectRepeatAll) return (
Queue
) }