"use client";
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
const require_components_client_Tooltip_UDSTooltipConfigProvider = require('./UDSTooltipConfigProvider.cjs');
const require_components_client_Tooltip_tooltipContext = require('./tooltipContext.cjs');
let react_jsx_runtime = require("react/jsx-runtime");
let _ariakit_react = require("@ariakit/react");

//#region src/components/client/Tooltip/Tooltip.tsx
/**
* **⚙️️ A Tooltip component that anchors to a trigger element
*
* @componentType Client component
*
* @description
* Tooltips provide short, contextual help for UI elements. They appear on hover, focus, or long-press, and should clarify meaning—not introduce new concepts.
*
* Tooltips are not meant for critical information or required actions. If the user must take action, use a Dialog, Popover, or Inline messaging instead.
*
* @see
* Check out the {@link https://uds.build/docs/components/tooltip Tooltip Docs} for more info
*
* @example
* ```tsx
* 'use client';
* import { Tooltip, TooltipTrigger, TooltipContent, Button } from "@yahoo/uds";
*
* <Tooltip>
*   <TooltipTrigger>
*     <Button>Tooltip Trigger</Button>
*   </TooltipTrigger>
*   <TooltipContent>basic tooltip content</TooltipContent>
* </Tooltip>
*```
*
* @related [Toast](https://uds.build/docs/components/toast), [Popover](https://uds.build/docs/components/popover)
**/
function Tooltip({ children, placement, open, portal = true }) {
	const isControlled = open !== void 0;
	const controlledProps = isControlled ? {
		showTimeout: 0,
		hideTimeout: 0,
		timeout: 0,
		...open ? { mounted: true } : {}
	} : void 0;
	const { animationDuration, ariaKitPlacement } = require_components_client_Tooltip_UDSTooltipConfigProvider.useTooltipConfig({ placement });
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Tooltip_tooltipContext.TooltipInternalContext.Provider, {
		value: {
			portal,
			isControlled
		},
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.TooltipProvider, {
			placement: ariaKitPlacement,
			animated: animationDuration,
			open,
			...controlledProps,
			children
		})
	});
}
Tooltip.displayName = "Tooltip";

//#endregion
exports.Tooltip = Tooltip;