import { jsxs as m, jsx as t } from "react/jsx-runtime";
import { cn as d } from "../../utils/cn/cn.es.js";
import s from "./assets/program_card_bg.png.es.js";
import i from "../../components/ProgramCard/programCard.module.css";
import { Typography as c } from "../Typography/Typography.es.js";
import { Icon as g } from "../Icon/Icon.es.js";
import { EIconName as u } from "../Icon/constants.es.js";
const f = (r) => {
  if (r.type === "coming_soon")
    return {
      title: {
        label: r.label || "Coming Soon",
        variant: "headingLg",
        mobileVariant: "headingXxs"
      }
    };
  if (r.type === "active") {
    const { label: a, image: e, link: n, isRounded: o, withArrow: l } = r;
    return {
      title: {
        label: a,
        variant: "displayXs",
        mobileVariant: "headingSm"
      },
      image: e || s,
      isRounded: o,
      withArrow: l,
      link: n
    };
  }
  return null;
};
function N(r) {
  const a = f(r);
  if (!a)
    return null;
  const e = a.link ? "a" : "div";
  return /* @__PURE__ */ m(
    e,
    {
      href: a.link || "",
      className: d(i.card, { [i.cardRounded]: a.isRounded }),
      "data-type": r.type,
      style: {
        backgroundImage: a.image ? `url(${a.image})` : void 0
      },
      children: [
        /* @__PURE__ */ t(
          c,
          {
            as: "p",
            defaultVariant: a.title.variant,
            mobileVariant: a.title.mobileVariant,
            className: i.label,
            children: a.title.label
          }
        ),
        a.withArrow && /* @__PURE__ */ t(g, { name: u.ARROW_FORWARD_THIN, className: i.arrow })
      ]
    }
  );
}
export {
  N as ProgramCard
};
