"use client"; import { translations, Language } from "../lib/translations"; import { useState, type Dispatch, type SetStateAction } from "react"; type SidebarTab = | "Dashboard" | "Tender Search" | "My Portfolio" | "Market Monitor" | "Company Profile" | "Agent Analysis" | "Proposal Draft" | "History" | "Database" | "About"; type Props = { tabs: readonly SidebarTab[]; activeTab: SidebarTab; onTabSelect: Dispatch>; status: string; lang: Language; forceExpanded?: boolean; }; export default function Sidebar({ tabs, activeTab, onTabSelect, status, lang, forceExpanded = false }: Props) { const t = translations[lang]; const [isHovered, setIsHovered] = useState(false); const isExpanded = forceExpanded || isHovered; const getTabLabel = (tab: SidebarTab) => { switch(tab) { case "Dashboard": return { label: t.dashboard, icon: "📊" }; case "Tender Search": return { label: t.tenderSearch, icon: "📡" }; case "My Portfolio": return { label: t.myPortfolio, icon: "★" }; case "Market Monitor": return { label: "Market Monitor", icon: "🛒" }; case "Company Profile": return { label: t.companyProfile, icon: "đŸĸ" }; case "Agent Analysis": return { label: t.agentAnalysis, icon: "🤖" }; case "Proposal Draft": return { label: t.proposalDraft, icon: "âœī¸" }; case "History": return { label: t.history, icon: "🕒" }; case "Database": return { label: "Local DB", icon: "đŸ—„ī¸" }; case "About": return { label: t.about, icon: "â„šī¸" }; default: return { label: tab, icon: "â€ĸ" }; } }; return ( ); }