import { Tooltip as TooltipPrimitive } from "bits-ui";
import Trigger from "./tooltip-trigger.svelte";
import Content from "./tooltip-content.svelte";

// Handle SSR safely
const Root = TooltipPrimitive?.Root ?? (class {} as any);
const Provider = TooltipPrimitive?.Provider ?? (class {} as any);
const Portal = TooltipPrimitive?.Portal ?? (class {} as any);

export {
	Root,
	Trigger,
	Content,
	Provider,
	Portal,
	//
	Root as Tooltip,
	Content as TooltipContent,
	Trigger as TooltipTrigger,
	Provider as TooltipProvider,
	Portal as TooltipPortal,
};
