import { jsx as u, jsxs as h, Fragment as F } from "react/jsx-runtime";
import { c as s } from "./bind-CU-R61T-.mjs";
import { a as L } from "./badge-DalD-yqG.mjs";
import { a as M } from "./spinner-DRQN6YdK.mjs";
import { a as R } from "./checkmark.es-DdgIZN2R.mjs";
import { a as k } from "./paragraph-DNtj7OLr.mjs";
import { a as O } from "./heading-gqtQNo5n.mjs";
import { forwardRef as D } from "react";
const E = {
  "purpur-card__container--full-height": "_purpur-card__container--full-height_1a0g7_1",
  "purpur-card__container--use-container-queries": "_purpur-card__container--use-container-queries_1a0g7_4",
  "purpur-card": "_purpur-card_1a0g7_1",
  "purpur-card__container--use-media-queries": "_purpur-card__container--use-media-queries_1a0g7_25"
}, A = {
  "purpur-card-badge": "_purpur-card-badge_k9ziu_1"
}, G = s.bind(A), J = "purpur-card-badge", K = ({
  ["data-testid"]: a = "purpur-card-badge",
  variant: t,
  text: r
}) => t && r ? /* @__PURE__ */ u(
  L,
  {
    className: G(J),
    variant: t,
    showIcon: !1,
    "data-testid": a,
    children: r
  }
) : null, P = {
  "purpur-card-content": "_purpur-card-content_2uc00_1"
}, U = s.bind(P), V = "purpur-card-content", W = ({
  ["data-testid"]: a = "purpur-card-content",
  children: t,
  className: r,
  ...e
}) => /* @__PURE__ */ u("div", { className: U(V, r), "data-testid": a, ...e, children: t }), X = {
  "purpur-card-content-container": "_purpur-card-content-container_1soww_1",
  "purpur-card-content-container--full-height": "_purpur-card-content-container--full-height_1soww_6",
  "purpur-card-content-container--footer": "_purpur-card-content-container--footer_1soww_31",
  "purpur-card-content-container--gap-size--sm": "_purpur-card-content-container--gap-size--sm_1soww_46",
  "purpur-card-content-container--gap-size--md": "_purpur-card-content-container--gap-size--md_1soww_49",
  "purpur-card-content-container--gap-size--lg": "_purpur-card-content-container--gap-size--lg_1soww_52",
  "purpur-card-content-container--gap-size--xl": "_purpur-card-content-container--gap-size--xl_1soww_55"
}, Y = s.bind(X), $ = "purpur-card-content-container", Z = ({
  ["data-testid"]: a = "purpur-card-content-container",
  children: t,
  className: r,
  isFooter: e = !1,
  fullHeight: c = !1,
  gapSize: p = "md",
  ...d
}) => /* @__PURE__ */ u(
  "div",
  {
    className: Y([
      $,
      r,
      `${$}--gap-size--${p}`,
      {
        [`${$}--full-height`]: c,
        [`${$}--footer`]: e
      }
    ]),
    "data-testid": a,
    ...d,
    children: t
  }
), Q = {
  "purpur-card-cta--button-styling": "_purpur-card-cta--button-styling_1stkr_1",
  "purpur-card-cta--button-styling--xs": "_purpur-card-cta--button-styling--xs_1stkr_22",
  "purpur-card-cta--button-styling--icon-only": "_purpur-card-cta--button-styling--icon-only_1stkr_25",
  "purpur-card-cta--button-styling--sm": "_purpur-card-cta--button-styling--sm_1stkr_28",
  "purpur-card-cta--button-styling--md": "_purpur-card-cta--button-styling--md_1stkr_34",
  "purpur-card-cta--button-styling--lg": "_purpur-card-cta--button-styling--lg_1stkr_40",
  "purpur-card-cta--button-styling--full-width": "_purpur-card-cta--button-styling--full-width_1stkr_46",
  "purpur-card-cta--button-styling--primary": "_purpur-card-cta--button-styling--primary_1stkr_64",
  "purpur-card-cta--button-styling--disabled": "_purpur-card-cta--button-styling--disabled_1stkr_68",
  "purpur-card-cta--button-styling--primary-negative": "_purpur-card-cta--button-styling--primary-negative_1stkr_74",
  "purpur-card-cta--button-styling--secondary": "_purpur-card-cta--button-styling--secondary_1stkr_86",
  "purpur-card-cta--button-styling--secondary-negative": "_purpur-card-cta--button-styling--secondary-negative_1stkr_97",
  "purpur-card-cta--button-styling--expressive": "_purpur-card-cta--button-styling--expressive_1stkr_108",
  "purpur-card-cta--button-styling--expressive-negative": "_purpur-card-cta--button-styling--expressive-negative_1stkr_118",
  "purpur-card-cta--cta-styling": "_purpur-card-cta--cta-styling_1stkr_130",
  "purpur-card-cta--secondary": "_purpur-card-cta--secondary_1stkr_135",
  "purpur-card-cta--disabled": "_purpur-card-cta--disabled_1stkr_135",
  "purpur-card-cta--text": "_purpur-card-cta--text_1stkr_143"
}, T = s.bind(Q), o = "purpur-card-cta", I = ({
  ["data-testid"]: a = "purpur-card-cta",
  className: t,
  children: r,
  disabled: e = !1,
  iconPosition: c = "right",
  loading: p = !1,
  text: d,
  linkStyling: n = !1,
  ..._
}) => /* @__PURE__ */ u(
  "div",
  {
    className: `${T([
      o,
      t,
      {
        [`${o}--disabled`]: e,
        [`${o}--text`]: !!d,
        [`${o}--cta-styling`]: n,
        [`${o}--button-styling`]: !n,
        [`${o}--button-styling--md`]: !n,
        [`${o}--button-styling--secondary`]: !n,
        [`${o}--button-styling--icon-only`]: !n && !d
      }
    ])} ${o}`,
    "data-testid": a,
    ..._,
    children: p ? /* @__PURE__ */ u(M, { "data-testid": `${a}-spinner`, size: "xs", disabled: e }) : /* @__PURE__ */ h(F, { children: [
      c === "left" && r,
      d,
      c === "right" && r
    ] })
  }
), S = {
  "purpur-card-feature-list": "_purpur-card-feature-list_1hnss_1",
  "purpur-card-feature-list__list-item": "_purpur-card-feature-list__list-item_1hnss_7",
  "purpur-card-feature-list__icon": "_purpur-card-feature-list__icon_1hnss_12"
}, f = s.bind(S), C = "purpur-card-feature-list", rr = ({
  ["data-testid"]: a = "purpur-card-feature-list",
  listItems: t
}) => t && t.length > 0 ? /* @__PURE__ */ u("ul", { className: f(C), "data-testid": a, children: t.map((r) => /* @__PURE__ */ h(
  "li",
  {
    className: f(`${C}__list-item`),
    "data-testid": `${a}-item`,
    children: [
      /* @__PURE__ */ u(R, { size: "xs", className: f(`${C}__icon`) }),
      /* @__PURE__ */ u(k, { children: r })
    ]
  },
  r
)) }) : null, tr = {
  "purpur-card-heading": "_purpur-card-heading_j3j6u_1",
  "purpur-card-heading__header": "_purpur-card-heading__header_j3j6u_6",
  "purpur-card-heading__heading": "_purpur-card-heading__heading_j3j6u_11",
  "purpur-card-heading__icon": "_purpur-card-heading__icon_j3j6u_14"
}, ar = {
  "purpur-card-trigger-item--link": "_purpur-card-trigger-item--link_t6ena_1",
  "purpur-card-trigger-item--button": "_purpur-card-trigger-item--button_t6ena_5",
  "purpur-card-trigger-item--disabled": "_purpur-card-trigger-item--disabled_t6ena_18",
  "purpur-card-trigger-item": "_purpur-card-trigger-item_t6ena_1"
}, w = s.bind(ar), l = "purpur-card-trigger-item", er = ({
  ["data-testid"]: a = "purpur-card-trigger-item",
  ["aria-label"]: t,
  disabled: r = !1,
  href: e,
  onClick: c,
  children: p,
  linkElement: d = "a"
}) => {
  const n = (y) => {
    r ? y.preventDefault() : c && c();
  }, _ = `${l} ${r ? `${l}--disabled` : ""}`;
  return e ? /* @__PURE__ */ u(
    d,
    {
      "aria-disabled": r,
      "aria-label": t,
      className: `${w([
        l,
        `${l}--link`,
        {
          [`${l}--disabled`]: r
        }
      ])} ${_}`,
      "data-testid": a,
      href: r ? void 0 : e,
      tabIndex: r ? 0 : void 0,
      onClick: n,
      children: p
    }
  ) : /* @__PURE__ */ u(
    "button",
    {
      "aria-disabled": r,
      "aria-label": t,
      className: `${w([
        l,
        `${l}--button`,
        {
          [`${l}--disabled`]: r
        }
      ])} ${_}`,
      "data-testid": a,
      type: "button",
      onClick: n,
      children: p
    }
  );
}, b = s.bind(tr), g = "purpur-card-heading", ur = ({
  ["data-testid"]: a = "purpur-card-heading",
  ["aria-label"]: t,
  title: r,
  icon: e,
  children: c,
  titleTag: p = "h2",
  enableHyphenation: d,
  onClick: n = void 0,
  href: _ = void 0,
  disabled: y = !1,
  linkElement: j = "a",
  variant: q = "title-100",
  ...H
}) => {
  const B = b(g, {
    [`${g}--is-interactive`]: n || _,
    [`${g}--disabled`]: y
  });
  return /* @__PURE__ */ h("div", { className: B, "data-testid": a, children: [
    /* @__PURE__ */ h("div", { className: b(`${g}__header`), children: [
      e && /* @__PURE__ */ u("div", { className: b(`${g}__icon`), children: e }),
      /* @__PURE__ */ u(
        O,
        {
          tag: p,
          className: b(`${g}__heading`),
          variant: q,
          enableHyphenation: d,
          ...H,
          children: n || _ ? /* @__PURE__ */ u(
            er,
            {
              "aria-label": t,
              disabled: y,
              href: _,
              onClick: n,
              linkElement: j,
              children: r
            }
          ) : r
        }
      )
    ] }),
    c
  ] });
}, cr = {
  "purpur-card-media": "_purpur-card-media_1om4o_1"
}, nr = s.bind(cr), sr = "purpur-card-media", dr = ({
  ["data-testid"]: a = "purpur-card-media",
  className: t,
  children: r,
  ...e
}) => /* @__PURE__ */ u("div", { ...e, className: nr([sr, t]), "data-testid": a, children: r }), pr = {
  "purpur-card-media-layout": "_purpur-card-media-layout_1c4sy_1",
  "purpur-card-media-layout--image-top": "_purpur-card-media-layout--image-top_1c4sy_11"
}, ir = s.bind(pr), x = "purpur-card-media-layout", or = ({
  ["data-testid"]: a = "purpur-card-media-layout",
  className: t,
  children: r,
  imageTop: e = !1,
  ...c
}) => /* @__PURE__ */ u(
  "div",
  {
    ...c,
    className: ir(x, t, { [`${x}--image-top`]: e }),
    "data-testid": a,
    children: r
  }
), _r = {
  "purpur-card-overline": "_purpur-card-overline_qhfj0_1"
}, lr = s.bind(_r), gr = "purpur-card-overline", mr = ({
  ["data-testid"]: a = "purpur-card-overline",
  overline: t
}) => t ? /* @__PURE__ */ u(k, { variant: "overline-100", className: lr(gr), "data-testid": a, children: t }) : null, yr = {
  "purpur-card-root": "_purpur-card-root_eupww_1",
  "purpur-card-root--primary": "_purpur-card-root--primary_eupww_7",
  "purpur-card-root--secondary": "_purpur-card-root--secondary_eupww_10",
  "purpur-card-root--full-height": "_purpur-card-root--full-height_eupww_13"
}, $r = s.bind(yr), N = "purpur-card-root", z = D(
  ({
    ["data-testid"]: a = "purpur-card-root",
    children: t,
    className: r,
    fullHeight: e = !0,
    variant: c,
    ...p
  }, d) => {
    const n = $r([
      N,
      {
        [`${N}--${c}`]: c,
        [`${N}--full-height`]: e
      },
      r
    ]);
    return /* @__PURE__ */ u("div", { className: n, "data-testid": a, ref: d, ...p, children: t });
  }
);
z.displayName = "CardRoot";
const v = s.bind(E), m = "purpur-card", i = ({ children: a, className: t, useMediaQueries: r, ...e }) => {
  const c = v([m, t]);
  return /* @__PURE__ */ u(
    "div",
    {
      className: v(`${m}__container`, {
        [`${m}__container--full-height`]: e.fullHeight,
        [`${m}__container--use-container-queries`]: !r,
        [`${m}__container--use-media-queries`]: r
      }),
      children: /* @__PURE__ */ u(z, { className: v(c), ...e, children: a })
    }
  );
};
i.Badge = K;
i.Content = W;
i.ContentContainer = Z;
i.Cta = I;
i.FeatureList = rr;
i.Overline = mr;
i.Heading = ur;
i.Media = dr;
i.MediaLayout = or;
i.displayName = "Card";
export {
  i as C
};
//# sourceMappingURL=card-DiMVw06l.mjs.map
