'use client'; import { useState } from 'react'; import { TabsTrigger } from '@/components/ui/tabs'; import { Separator } from '@/components/ui/separator'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { Mountain, Sparkles, Brain, Wand2, Bone, Shield, Hammer, Gem, Trophy, FlaskConical, BarChart3, BookOpen, Wrench } from 'lucide-react'; interface TabBarProps { activeTab: string; onTabChange: (value: string) => void; isMobile?: boolean; } // Tab configuration with groups const TAB_GROUPS = [ { name: 'World', tabs: [ { value: 'spire', label: 'Spire', icon: Mountain, mobileLabel: 'Spire' }, { value: 'attunements', label: 'Attune', icon: Sparkles, mobileLabel: 'Attune' }, ] }, { name: 'Power', tabs: [ { value: 'skills', label: 'Skills', icon: Brain, mobileLabel: 'Skills' }, { value: 'spells', label: 'Spells', icon: Wand2, mobileLabel: 'Spells' }, { value: 'golemancy', label: 'Golems', icon: Bone, mobileLabel: 'Golems' }, ] }, { name: 'Gear', tabs: [ { value: 'equipment', label: 'Gear', icon: Shield, mobileLabel: 'Gear' }, { value: 'crafting', label: 'Craft', icon: Hammer, mobileLabel: 'Craft' }, { value: 'loot', label: 'Loot', icon: Gem, mobileLabel: 'Loot' }, ] }, { name: 'Meta', tabs: [ { value: 'achievements', label: 'Achieve', icon: Trophy, mobileLabel: 'Achieve' }, { value: 'stats', label: 'Stats', icon: BarChart3, mobileLabel: 'Stats' }, { value: 'debug', label: 'Debug', icon: Wrench, mobileLabel: 'Debug' }, ] } ]; export function TabBar({ activeTab, onTabChange, isMobile = false }: TabBarProps) { if (isMobile) { return (
{TAB_GROUPS.map((group, groupIndex) => (
{groupIndex > 0 && ( )} {group.tabs.map((tab) => { const Icon = tab.icon; const isActive = activeTab === tab.value; return (

{tab.label}

); })}
))}
); } // Desktop view - grouped tabs with separators return (
{TAB_GROUPS.map((group, groupIndex) => (
{groupIndex > 0 && ( )} {group.tabs.map((tab) => { const isActive = activeTab === tab.value; return ( {tab.label} ); })}
))}
); } TabBar.displayName = "TabBar";