"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const React = require("react");
require("clsx");
const Box = require("../../../core/Box/Box.cjs");
const Slider_context = require("../Slider.context.cjs");
const getPosition = require("../utils/get-position/get-position.cjs");
const isMarkFilled = require("./is-mark-filled.cjs");
function Marks({ marks, min, max, disabled, value, offset, inverted }) {
  const { getStyles } = Slider_context.useSliderContext();
  if (!marks) {
    return null;
  }
  const items = marks.map((mark, index) => /* @__PURE__ */ React.createElement(
    Box.Box,
    {
      ...getStyles("markWrapper"),
      __vars: { "--mark-offset": `${getPosition.getPosition({ value: mark.value, min, max })}%` },
      key: index
    },
    /* @__PURE__ */ jsxRuntime.jsx(
      Box.Box,
      {
        ...getStyles("mark"),
        mod: { filled: isMarkFilled.isMarkFilled({ mark, value, offset, inverted }), disabled }
      }
    ),
    mark.label && /* @__PURE__ */ jsxRuntime.jsx("div", { ...getStyles("markLabel"), children: mark.label })
  ));
  return /* @__PURE__ */ jsxRuntime.jsx("div", { children: items });
}
Marks.displayName = "@mantine/core/SliderMarks";
exports.Marks = Marks;
