"use client";
import { jsx as s } from "react/jsx-runtime";
import { classNames as f } from "../../utils/index.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/alpha/Alpha.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/block/Block.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/circle/Circle.js";
import M from "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/chrome/Chrome.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/compact/Compact.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/github/Github.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/hue/Hue.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/material/Material.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/photoshop/Photoshop.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/sketch/Sketch.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/slider/Slider.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/swatches/Swatches.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/twitter/Twitter.js";
import "../../../../../node_modules/.pnpm/react-color@2.19.3_react@19.0.0/node_modules/react-color/es/components/google/Google.js";
import "react";
import "../../../../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js";
function n({ r: o = 0, g: r = 0, b: i = 0, a: m = 1 }) {
  const t = (c, u, x) => Math.min(x, Math.max(u, c)), e = t(Math.round(o), 0, 255), l = t(Math.round(r), 0, 255), a = t(Math.round(i), 0, 255), d = t(m, 0, 1), p = (c) => c.toString(16).padStart(2, "0");
  return `#${p(e)}${p(l)}${p(a)}${Math.round(d * 255).toString(16).padStart(2, "0")}`;
}
const F = ({
  color: o,
  onChange: r,
  disableAlpha: i = !1,
  className: m
}) => /* @__PURE__ */ s("div", { className: f("color-picker", m), children: /* @__PURE__ */ s(
  M,
  {
    color: o,
    disableAlpha: i,
    onChangeComplete: (t) => {
      t.source === "rgb" ? r == null || r(n(t.rgb)) : r == null || r(t.hex);
    }
  }
) });
export {
  F as ColorPicker
};
//# sourceMappingURL=color-picker.js.map
