"use client";
import * as React from "react";
import { TooltipProviderContext } from "./TooltipProviderContext.js";
import { jsx } from "react/jsx-runtime";
import { FloatingDelayGroup } from "../../floating-ui-react/components/FloatingDelayGroup.js";
const TooltipProvider = function TooltipProvider2(props) {
  const {
    delay,
    closeDelay,
    timeout = 400
  } = props;
  const contextValue = React.useMemo(() => ({
    delay,
    closeDelay
  }), [delay, closeDelay]);
  const delayValue = React.useMemo(() => ({
    open: delay,
    close: closeDelay
  }), [delay, closeDelay]);
  return /* @__PURE__ */ jsx(TooltipProviderContext.Provider, {
    value: contextValue,
    children: /* @__PURE__ */ jsx(FloatingDelayGroup, {
      delay: delayValue,
      timeoutMs: timeout,
      children: props.children
    })
  });
};
if (process.env.NODE_ENV !== "production") TooltipProvider.displayName = "TooltipProvider";
export {
  TooltipProvider
};
//# sourceMappingURL=TooltipProvider.js.map
