import { jsx as r } from "@emotion/react/jsx-runtime";
import { useModuleSkeleton as l } from "@m4l/core";
import { useComponentSize as u } from "../../../../hooks/useComponentSize/index.js";
import { getPropDataTestId as c } from "../../../../test/getNameDataTestId.js";
import { SkeletonStyled as p, RootStyled as d } from "./slots/CircularProgressSlots.js";
import { CircularProgressSlots as f } from "./slots/CircularProgressEnum.js";
import { CIRCULAR_PROGRESS_PREFIX as z } from "./constants.js";
const y = (s) => {
  const { size: m = "medium", color: i = "primary", instaceDataTestId: n, ...S } = s, { currentSize: o } = u(m), a = l(), t = o === "small" || o === "medium" ? o : "medium", e = {
    color: i,
    size: t
  };
  return a ? /* @__PURE__ */ r(
    p,
    {
      ownerState: { ...e },
      ...c(z, f.root, n)
    }
  ) : /* @__PURE__ */ r(d, { size: t, ownerState: { ...e }, ...S });
};
export {
  y as CircularProgress
};
