import { X } from "lucide-react";
import type { ReactNode } from "react";
import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip";
interface PanelTabCloseButtonProps {
children: ReactNode;
label: string;
onClick: () => void;
tooltip?: string;
}
/** Inside a `group/tab` row, swaps the tab identity for its close action on hover or focus. */
export function PanelTabCloseButton({
children,
label,
onClick,
tooltip,
}: PanelTabCloseButtonProps) {
const button = (
);
if (!tooltip) return button;
return (
{tooltip}
);
}