"use client"; import { useCollections, useGenres } from "@/hooks/use-library"; import type { LibrarySearchParams } from "@/hooks/use-library-search"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Badge } from "@/components/ui/badge"; import { ArrowLeft } from "lucide-react"; interface Props { filter: LibrarySearchParams; onFilterChange: (next: Partial) => void; viewMode: "grouped" | "flat"; drilldown: null | { series: string } | { series: string; season: number }; onBack: () => void; } const ALL = ""; const CONTENT_TYPES_ALL = [ { value: ALL, label: "All types" }, { value: "movie", label: "Movies" }, { value: "episode", label: "Episodes" }, { value: "short", label: "Shorts" }, ]; const CONTENT_TYPES_GROUPED = [ { value: ALL, label: "All types" }, { value: "movie", label: "Movies" }, { value: "short", label: "Shorts" }, ]; export function LibrarySidebar({ filter, onFilterChange, viewMode, drilldown, onBack }: Props) { const { data: collections } = useCollections(filter.provider); const { data: genres } = useGenres(filter.type, { provider: filter.provider }); if (drilldown !== null) { return ( ); } const contentTypes = viewMode === "grouped" ? CONTENT_TYPES_GROUPED : CONTENT_TYPES_ALL; return ( ); }