import { jsx as a } from "react/jsx-runtime";
import { c as m } from "./index.CfM2L_w0.js";
import { a as _ } from "./index.CfQlFjZU.js";
import { n as g } from "./index.B0wX8xO7.js";
import { L as v } from "./LoadingState.BcrOPPws.js";
const h = "creator_card_p3nLQ", u = "creator_fillHeight_R3JNp", C = "creator_cardStatic_2-Z-1", f = "creator_elevationLow_csaw9", p = "creator_elevationMedium_Gkw73", w = "creator_elevationHigh_yhXM7", S = "creator_cardInteractive_so8vC", H = "creator_cardSelected_gjKby", L = "creator_loadingContainer_cDCV5", e = { card: h, fillHeight: u, cardStatic: C, elevationLow: f, elevationMedium: p, elevationHigh: w, cardInteractive: S, cardSelected: H, loadingContainer: L };
function N({
  children: o,
  className: c,
  fillHeight: r,
  selected: i,
  disabled: n,
  onClick: l,
  interaction: t = "static",
  elevation: d,
  ...s
}) {
  return {
    containerClassName: m(e.card, c, {
      [e.cardStatic]: t === "static",
      [e.cardInteractive]: t === "interactive" || t === "selectable",
      [e.cardSelected]: i,
      [e.fillHeight]: r,
      [e.elevationLow]: d === "low",
      [e.elevationMedium]: d === "medium",
      [e.elevationHigh]: d === "high"
    }),
    loadingContainerClassName: e.loadingContainer,
    children: o,
    component: t === "static" ? "div" : "button",
    role: t === "static" ? "document" : void 0,
    onClick: l,
    disabled: n,
    loading: !!("loading" in s && s.loading)
  };
}
function y({
  containerClassName: o,
  children: c,
  component: r,
  role: i,
  onClick: n,
  disabled: l,
  loading: t
}) {
  return /* @__PURE__ */ a(
    r,
    {
      className: o,
      role: i,
      onClick: n,
      disabled: l,
      children: /* @__PURE__ */ a(
        g,
        {
          value: t,
          then: /* @__PURE__ */ a("div", { className: e.loadingContainer, children: /* @__PURE__ */ a(v, { type: "wheel", size: "small" }) }),
          otherwise: c
        }
      )
    }
  );
}
const V = _(y, N, "Card");
export {
  V as C
};
