import { useTheme } from "@/context/ThemeContext"; import { TABS, TabsCount } from "@/utils/navigation"; import { For } from "solid-js"; import { SelectableBox, SelectableText } from "@/components/Selectable"; import { useNavigation } from "@/context/NavigationContext"; export const tabs: TabDefinition[] = [ { id: TABS.FEED, label: "Feed" }, { id: TABS.MYSHOWS, label: "My Shows" }, { id: TABS.DISCOVER, label: "Discover" }, { id: TABS.SEARCH, label: "Search" }, { id: TABS.PLAYER, label: "Player" }, { id: TABS.SETTINGS, label: "Settings" }, ]; export function TabNavigation() { const { theme } = useTheme(); const { activeTab, setActiveTab, activeDepth } = useNavigation(); return ( {(tab) => ( tab.id == activeTab()} onMouseDown={() => setActiveTab(tab.id)} > tab.id == activeTab()} primary alignSelf="center" > {tab.label} )} ); } export type TabDefinition = { id: TABS; label: string; };