function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
/*
 * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { Tooltip as BaseUITooltip } from "@base-ui/react/tooltip";
import classnames from "classnames";
import React from "react";
import styles from "./Tooltip.module.css";
function TooltipRoot({
  children,
  ...rest
}) {
  return /*#__PURE__*/React.createElement(BaseUITooltip.Root, rest, children);
}
function TooltipProvider({
  children,
  ...rest
}) {
  return /*#__PURE__*/React.createElement(BaseUITooltip.Provider, rest, children);
}
// Base UI defaults to 600ms which feels too slow
const TOOLTIP_TRIGGER_DELAY_MS = 200;
function TooltipTrigger({
  className,
  children,
  delay = TOOLTIP_TRIGGER_DELAY_MS,
  ...rest
}) {
  return /*#__PURE__*/React.createElement(BaseUITooltip.Trigger, _extends({
    className: classnames(styles.osdkTooltipTrigger, className),
    delay: delay
  }, rest), children);
}
function TooltipPositioner({
  className,
  children,
  sideOffset = 4,
  ...rest
}) {
  return /*#__PURE__*/React.createElement(BaseUITooltip.Positioner, _extends({
    className: classnames(styles.osdkTooltipPositioner, className),
    sideOffset: sideOffset
  }, rest), children);
}
function TooltipPopup({
  className,
  children,
  ...rest
}) {
  return /*#__PURE__*/React.createElement(BaseUITooltip.Popup, _extends({
    className: classnames(styles.osdkTooltipPopup, className)
  }, rest), children);
}
export function TooltipArrow() {
  return /*#__PURE__*/React.createElement(BaseUITooltip.Arrow, {
    className: styles.osdkTooltipArrow
  }, /*#__PURE__*/React.createElement(ArrowSvg, null));
}
function ArrowSvg(props) {
  return /*#__PURE__*/React.createElement("svg", _extends({
    width: "20",
    height: "10",
    viewBox: "0 0 20 10",
    fill: "none"
  }, props), /*#__PURE__*/React.createElement("path", {
    d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
    className: styles.tooltipArrowFill
  }), /*#__PURE__*/React.createElement("path", {
    d: "M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z",
    className: styles.tooltipArrowOuterStroke
  }));
}
export const Tooltip = {
  Root: TooltipRoot,
  Provider: TooltipProvider,
  Trigger: TooltipTrigger,
  Portal: BaseUITooltip.Portal,
  Positioner: TooltipPositioner,
  Popup: TooltipPopup,
  Arrow: TooltipArrow
};
//# sourceMappingURL=Tooltip.js.map