'use client';
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/Slider/Slider.tsx
var Slider_exports = {};
__export(Slider_exports, {
  Slider: () => Slider,
  sliderVariant: () => sliderVariant
});
module.exports = __toCommonJS(Slider_exports);
var React = __toESM(require("react"), 1);
var import_lib = require("@paalan/react-shared/lib");
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
var import_jsx_runtime = require("react/jsx-runtime");
var sliderVariant = {
  primary: {
    track: "bg-primary/20",
    range: "bg-primary",
    thumb: "border-primary/50"
  },
  secondary: {
    track: "bg-secondary/20",
    range: "bg-secondary",
    thumb: "border-secondary/50"
  },
  tertiary: {
    track: "bg-tertiary/20",
    range: "bg-tertiary",
    thumb: "border-tertiary/50"
  },
  danger: {
    track: "bg-danger/20",
    range: "bg-danger",
    thumb: "border-danger/50"
  },
  warning: {
    track: "bg-warning/20",
    range: "bg-warning",
    thumb: "border-warning/50"
  },
  success: {
    track: "bg-success/20",
    range: "bg-success",
    thumb: "border-success/50"
  },
  info: {
    track: "bg-info/20",
    range: "bg-info",
    thumb: "border-info/50"
  }
};
var Slider = React.forwardRef(
  ({ className, variant = "primary", ...props }, ref) => {
    const sliderVariantColor = sliderVariant[variant || "primary"];
    return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
      SliderPrimitive.Root,
      {
        ref,
        className: (0, import_lib.cn)("relative flex w-full touch-none select-none items-center", className),
        ...props,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
            SliderPrimitive.Track,
            {
              className: (0, import_lib.cn)("relative h-1.5 w-full grow overflow-hidden rounded-full", sliderVariantColor.track),
              children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SliderPrimitive.Range, { className: (0, import_lib.cn)("absolute h-full", sliderVariantColor.range) })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
            SliderPrimitive.Thumb,
            {
              className: (0, import_lib.cn)(
                "block h-4 w-4 rounded-full border bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
                sliderVariantColor.thumb
              )
            }
          )
        ]
      }
    );
  }
);
Slider.displayName = SliderPrimitive.Root.displayName;
