"use client" import { MessagesSquareIcon, TicketCheckIcon } from "lucide-react" import Link from "next/link" import { usePathname } from "next/navigation" import { useI18n } from "@/i18n/provider" import { cn } from "@/lib/utils" import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip" import { WorkspaceSwitcher } from "@/components/workspace-switcher" const workbenchRailItems = [ { key: "conversations", titleKey: "nav.conversations", href: "/workbench", icon: MessagesSquareIcon, }, { key: "tickets", titleKey: "nav.tickets", href: "/workbench/tickets", icon: TicketCheckIcon, }, ] function normalizePath(path: string | null | undefined) { if (!path) { return "" } return path.length > 1 ? path.replace(/\/+$/, "") : path } export function WorkbenchRail() { const t = useI18n() const pathname = usePathname() const currentPath = normalizePath(pathname) return ( ) }