+
+ {
+ setSource(next);
+ setLibraryId(null);
+ }}
+ options={[
+ { value: 'library', label: 'Library', icon: },
+ { value: 'collections', label: 'Collections', icon: }
+ ]}
+ />
+
+ setCompact(next === 'list')}
+ options={[
+ { value: 'grid', icon: , title: 'Poster grid' },
+ { value: 'list', icon: , title: 'Compact list' }
+ ]}
+ />
+
+
setSearchInput(event.target.value)}
+ leadingIcon={
}
+ placeholder={source === 'collections' ? 'Search collections…' : 'Search shows & movies…'}
+ />
+ {source === 'library' && libraryChips.length > 0 && (
+
+ setLibraryId(null)}
+ >
+ All
+
+ {libraryChips.map((chip) => (
+ setLibraryId(chip.id)}
+ >
+ {chip.name}
+
+ ))}
+
+ )}
+
+
+
+ {browse.state.status === 'loading' ? (
+
+
+
+ ) : browse.state.status === 'error' ? (
+
+ {browse.state.error}
+
+ ) : items.length === 0 ? (
+
No titles match.
+ ) : (
+ <>
+
+ {items.map((item) => (
+ addItem(item)}
+ onDragStart={() => setDragLib(lineupKey(item))}
+ onDragEnd={() => {
+ if (dragLib != null) {
+ const dragged = items.find((candidate) => lineupKey(candidate) === dragLib);
+ if (dragged) {
+ addItem(dragged);
+ }
+ }
+ setDragLib(null);
+ setDragRow(null);
+ setOverRow(null);
+ }}
+ />
+ ))}
+
+ {browse.canLoadMore && (
+
+
+ Load more
+
+
+ )}
+ >
+ )}
+
+
+