import { jsx as e } from "@emotion/react/jsx-runtime";
import { clsx as C } from "clsx";
import { useModuleSkeleton as f } from "@m4l/core";
import { withRHFController as P } from "../../../hocs/withRHFController/index.js";
import { getPropDataTestId as d } from "../../../test/getNameDataTestId.js";
import { getComponentClasses as R } from "../../../utils/getComponentSlotRoot.js";
import { ColorPicker as k } from "../../ColorPicker/ColorPicker.js";
import { RHFCOLOR_PICKER_KEY_COMPONENT as s } from "./constants.js";
import { RHFColorPickerSlots as i } from "./slots/RHFColorPickerEnum.js";
import { RootStyled as F } from "./slots/RHFColorPickerSlots.js";
const H = (m) => {
  const {
    size: o,
    instaceDataTestId: r,
    disabled: l,
    className: c,
    ...n
  } = m, t = f(), a = {
    size: o
  }, p = R(s, i);
  return /* @__PURE__ */ e(
    F,
    {
      className: C(c, p.root),
      role: t ? "presentation" : void 0,
      ...d(
        s,
        i.root,
        r
      ),
      ownerState: { ...a },
      children: /* @__PURE__ */ e(
        k,
        {
          ...n,
          size: o,
          disabled: l,
          isSkeleton: t,
          instaceDataTestId: r
        }
      )
    }
  );
}, S = P(H), h = S;
export {
  h as RHFColorPicker
};
