import { b9 as f, ba as S, bb as c, bc as _, bd as k, be as g, bf as h } from "./App-7cdde89e.mjs";
import * as o from "react";
import { keyframes as x } from "@emotion/react";
function i() {
  return i = Object.assign || function(a) {
    for (var e = 1; e < arguments.length; e++) {
      var t = arguments[e];
      for (var s in t)
        Object.prototype.hasOwnProperty.call(t, s) && (a[s] = t[s]);
    }
    return a;
  }, i.apply(this, arguments);
}
function v(a, e) {
  if (a == null)
    return {};
  var t = {}, s = Object.keys(a), r, n;
  for (n = 0; n < s.length; n++)
    r = s[n], !(e.indexOf(r) >= 0) && (t[r] = a[r]);
  return t;
}
var C = ["startColor", "endColor", "isLoaded", "fadeDuration", "speed", "className"], N = ["size"], R = f("div", {
  baseStyle: {
    boxShadow: "none",
    backgroundClip: "padding-box",
    cursor: "default",
    color: "transparent",
    pointerEvents: "none",
    userSelect: "none",
    "&::before, &::after, *": {
      visibility: "hidden"
    }
  }
}), P = x({
  from: {
    opacity: 0
  },
  to: {
    opacity: 1
  }
}), E = function() {
  var e = o.useRef(!0);
  return o.useEffect(function() {
    e.current = !1;
  }, []), e.current;
}, l = /* @__PURE__ */ S(function(a, e) {
  var t = _("Skeleton", a), s = E(), r = k(a);
  r.startColor, r.endColor;
  var n = r.isLoaded, m = r.fadeDuration;
  r.speed;
  var p = r.className, d = v(r, C), b = g(n), u = h("chakra-skeleton", p);
  if (n) {
    var y = s || b ? "none" : P + " " + m + "s";
    return /* @__PURE__ */ o.createElement(f.div, i({
      ref: e,
      className: u,
      __css: {
        animation: y
      }
    }, d));
  }
  return /* @__PURE__ */ o.createElement(R, i({
    ref: e,
    className: u
  }, d, {
    __css: t
  }));
});
l.defaultProps = {
  fadeDuration: 0.4,
  speed: 0.8
};
c && (l.displayName = "Skeleton");
var z = function(e) {
  var t = e.size, s = t === void 0 ? "2rem" : t, r = v(e, N);
  return /* @__PURE__ */ o.createElement(l, i({
    borderRadius: "full",
    boxSize: s
  }, r));
};
c && (z.displayName = "SkeletonCircle");
export {
  z as S,
  l as a
};
