import { jsx as e, jsxs as r, Fragment as p } from "react/jsx-runtime";
import { formatDate as g } from "../../../../utils/formatDate.es.js";
import { EAnalyticsEventType as y } from "../../../../types/analytics/analytics.es.js";
import a from "../../../../modules/ResearchStudies/components/StudyCard/studyCard.module.css";
import { Label as v } from "../../../../components/Label/Label.es.js";
import { Typography as t } from "../../../../components/Typography/Typography.es.js";
function C({
  title: i,
  link: m,
  image: d,
  date: s,
  label: l,
  readTime: o,
  trackingEvent: n,
  trackingLocation: h
}) {
  const u = () => {
    var c;
    if (n) {
      const f = {
        event: n,
        location: h || "",
        type: y.interaction,
        payload: {
          articleTitle: i
        }
      };
      (c = window.eventBus) == null || c.emit("analytics", f);
    }
  };
  return /* @__PURE__ */ e("a", { href: m, className: a.root, onClick: u, children: /* @__PURE__ */ r("div", { className: a.content, children: [
    /* @__PURE__ */ e("div", { className: a.imagePart, style: { backgroundImage: `url(${d})` }, children: l && /* @__PURE__ */ e(v, { color: "white", size: "lg", children: l }) }),
    /* @__PURE__ */ r("div", { className: a.dataPart, children: [
      /* @__PURE__ */ r("div", { className: a.info, children: [
        /* @__PURE__ */ e(t, { defaultVariant: "labelSm", emphasis: !0, weight: "medium", color: "color-neutral-500", children: g(s) }),
        !!o && /* @__PURE__ */ r(p, { children: [
          /* @__PURE__ */ e(t, { defaultVariant: "labelSm", emphasis: !0, weight: "medium", color: "color-neutral-500", children: "•" }),
          /* @__PURE__ */ r(t, { defaultVariant: "labelSm", emphasis: !0, weight: "medium", color: "color-neutral-500", children: [
            o,
            " MIN READ"
          ] })
        ] })
      ] }),
      /* @__PURE__ */ e(t, { className: a.title, defaultVariant: "headingXs", children: i })
    ] }),
    /* @__PURE__ */ e("div", { className: a.borderLeft, "data-line": "left" }),
    /* @__PURE__ */ e("div", { className: a.borderRight, "data-line": "right" })
  ] }) });
}
export {
  C as StudyCard
};
