import { jsx as n } from "react/jsx-runtime";
import T from "react-content-loader";
import { isNil as g } from "es-toolkit/predicate";
import { cond as R } from "es-toolkit/compat";
import u from "../../hooks/useDarkMode.js";
const c = "rect", d = "circle", A = 2, U = 14, _ = "100%", w = 16, F = c, I = ({ children: e }) => !g(e), x = ({ children: e }) => e, H = ({ type: e }) => e === c, r = ({ type: e }) => e === d, k = ({ rx: e = 3, ry: o = 3 }) => /* @__PURE__ */ n("rect", { width: "100%", height: "100%", rx: e, ry: o }), N = ({ radius: e }) => /* @__PURE__ */ n("circle", { cx: e, cy: e, r: e }), h = (e) => {
  const {
    speed: o = A,
    width: l = _,
    height: m = U,
    radius: s = w,
    type: p = F,
    className: C = "",
    children: E,
    ...f
  } = e, i = u(), t = {
    type: p,
    radius: s,
    children: E
  }, D = R([
    [I, x],
    [H, k],
    [r, N]
  ])(t), a = r(t) ? s * 2 : m, L = r(t) ? a : l;
  return /* @__PURE__ */ n(
    T,
    {
      backgroundColor: "#f5f6f7",
      foregroundColor: i ? "#aaaaaa" : "#eeeeee",
      speed: o,
      height: a,
      width: L,
      className: `ContentLoader ${C} ${i ? "use-mix-blend-mode" : ""}`,
      ...f,
      children: D
    }
  );
};
h.RECT = c;
h.CIRCLE = d;
export {
  h as default
};
//# sourceMappingURL=ContentLoader.js.map
