import { useMemo } from 'react'; import * as api from '../plex/api'; import { useSectionFor, useServerQuery } from '../app/queries'; import { navigate, useRouter, type SectionKind, type SectionTab } from '../app/router'; import { useSettings } from '../app/settings'; import type { Section } from '../plex/types'; import { Hero } from '../ui/Hero'; import { HubShelf } from '../ui/media'; import { useServer } from '../app/session'; import { Icon } from '../ui/Icon'; import { categoryArtwork } from './categories'; import { Artwork, EmptyState, ErrorState, PageLoader, Select } from '../ui/primitives'; import { buildFeatures, HIDDEN_HUBS, recentSeasons } from './discover'; import { LibraryBrowser } from './LibraryBrowser'; const TABS: { id: SectionTab; label: string }[] = [ { id: 'discover', label: 'Discover' }, { id: 'library', label: 'Library' }, { id: 'categories', label: 'Categories' }, ]; function SectionHeader({ kind, tab, section, all, overlay }: { kind: SectionKind; tab: SectionTab; section: Section; all: Section[]; overlay: boolean }) { const set = useSettings((s) => s.set); return (

{kind === 'movie' ? 'Movies' : 'TV Shows'}

{all.length > 1 && (