"use client"; import type { LucideIcon } from "lucide-react"; import type React from "react"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; interface SidebarButtonProps { icon: LucideIcon; label: string; onClick?: () => void; isCollapsed?: boolean; isActive?: boolean; badge?: React.ReactNode; /** Overlay in the top-right corner of the collapsed icon (e.g. status badge) */ collapsedOverlay?: React.ReactNode; /** Custom icon node for expanded mode — overrides the default rendering */ expandedIconNode?: React.ReactNode; /** Optional inline trailing content shown in expanded mode */ trailingContent?: React.ReactNode; /** Optional tooltip content that replaces the default label tooltip */ tooltipContent?: React.ReactNode; className?: string; /** Extra attributes spread onto the inner {tooltipContent ?? ( <> {label} {typeof badge === "string" && ` (${badge})`} )} ); } const button = ( ); if (!tooltipContent) { return button; } return ( {button} {tooltipContent} ); }