import { jsx as e } from "@emotion/react/jsx-runtime";
import { useTheme as d } from "@mui/material";
import { PropagateLoaderSpinnerStyled as f, LoaderStyled as S } from "./slots/PropagateLoaderSpinnerSlots.js";
import { PROPAGATE_LOADER_SPINNER_KEY_COMPONENT as t } from "./constants.js";
import { getComponentSlotRoot as P } from "../../../../utils/getComponentSlotRoot.js";
import { getPropDataTestId as c } from "../../../../test/getNameDataTestId.js";
import g from "clsx";
import { PropagateLoaderSpinnerSlots as u } from "./slots/PropagateLoaderSpinnerEnum.js";
const y = ({
  loading: r = !0,
  color: p,
  speedMultiplier: a = 1,
  cssOverride: m,
  dataTestId: n,
  className: i,
  ...o
}) => {
  const { palette: l } = d(), s = {};
  return r ? /* @__PURE__ */ e(
    f,
    {
      ownerState: s,
      className: g(P(t), i),
      ...c(t, u.root, n),
      ...o,
      role: "propagate-loader-spinner",
      children: /* @__PURE__ */ e(
        S,
        {
          loading: r,
          color: p || l.primary.enabled,
          speedMultiplier: a,
          cssOverride: m,
          ...o
        }
      )
    }
  ) : null;
};
export {
  y as PropagateLoaderSpinner
};
