import { jsx } from "react/jsx-runtime";
import "react";
import "clsx";
import { getThemeColor } from "../../../core/MantineProvider/color-functions/get-theme-color/get-theme-color.mjs";
import { useMantineTheme } from "../../../core/MantineProvider/MantineThemeProvider/MantineThemeProvider.mjs";
import { Box } from "../../../core/Box/Box.mjs";
import { Tooltip } from "../../Tooltip/Tooltip.mjs";
import { getCurveProps } from "./get-curve-props.mjs";
function Curve({
  size,
  value,
  offset,
  sum,
  thickness,
  root,
  color,
  lineRoundCaps,
  tooltip,
  getStyles,
  display,
  ...others
}) {
  const theme = useMantineTheme();
  return /* @__PURE__ */ jsx(Tooltip.Floating, { disabled: !tooltip, label: tooltip, children: /* @__PURE__ */ jsx(
    Box,
    {
      component: "circle",
      ...others,
      ...getStyles("curve"),
      __vars: { "--curve-color": color ? getThemeColor(color, theme) : void 0 },
      fill: "none",
      strokeLinecap: lineRoundCaps ? "round" : "butt",
      ...getCurveProps({ sum, size, thickness, value, offset, root })
    }
  ) });
}
Curve.displayName = "@mantine/core/Curve";
export {
  Curve
};
