import { useTheme } from "@/context/ThemeContext"; import { For } from "solid-js"; interface TabNavigationProps { activeTab: TabId; onTabSelect: (tab: TabId) => void; } export const tabs: TabDefinition[] = [ { id: "feed", label: "Feed" }, { id: "shows", label: "My Shows" }, { id: "discover", label: "Discover" }, { id: "search", label: "Search" }, { id: "player", label: "Player" }, { id: "settings", label: "Settings" }, ]; export function TabNavigation(props: TabNavigationProps) { const { theme } = useTheme(); return ( {(tab) => ( props.onTabSelect(tab.id)} style={{ backgroundColor: tab.id == props.activeTab ? theme.primary : "transparent", }} > {tab.label} )} ); } export type TabId = | "feed" | "shows" | "discover" | "search" | "player" | "settings"; export type TabDefinition = { id: TabId; label: string; };