import { jsxs as r, jsx as i } from "react/jsx-runtime";
import { EAnalyticsEventType as N, EAnalyticsEvent as b } from "../../types/analytics/analytics.es.js";
import { cn as m } from "../../utils/cn/cn.es.js";
import a from "../../components/ProductListing/productListing.module.css";
import { Label as g } from "../Label/Label.es.js";
import { Typography as s } from "../Typography/Typography.es.js";
import { TypeBadge as u } from "../TypeBadge/TypeBadge.es.js";
import { Button as n } from "../Button/Button.es.js";
const T = ({
  name: t,
  description: p,
  image: h,
  price: y,
  buttons: c,
  features: f,
  label: d,
  zenpatientId: v
}) => {
  const o = (e, l) => ({
    event: b.ctaClicked,
    type: N.interaction,
    component: "ProductListing",
    element: `button_${l}`,
    payload: {
      ctaLabel: e.label,
      productId: v,
      productName: t
    }
  });
  return /* @__PURE__ */ r("section", { className: a.root, children: [
    /* @__PURE__ */ r("div", { className: a.imageWrapper, children: [
      /* @__PURE__ */ i("img", { src: h, alt: t, className: a.image }),
      d && /* @__PURE__ */ i(g, { color: "black", size: "sm", className: a.label, children: d })
    ] }),
    /* @__PURE__ */ r("div", { className: a.content, children: [
      /* @__PURE__ */ r("div", { className: a.header, children: [
        /* @__PURE__ */ i(s, { as: "h3", defaultVariant: "headingXl", mobileVariant: "headingMd", children: t }),
        /* @__PURE__ */ i(s, { as: "p", defaultVariant: "bodySm", children: p })
      ] }),
      /* @__PURE__ */ i("div", { className: a.features, children: f.map((e, l) => /* @__PURE__ */ r("div", { className: a.feature, children: [
        /* @__PURE__ */ i(u, { type: e.type }, l),
        /* @__PURE__ */ i(s, { as: "span", defaultVariant: "bodyMd", className: a.featureLabel, children: e.label })
      ] }, `${e.label}-${l}`)) }),
      /* @__PURE__ */ i("div", { className: a.divider }),
      /* @__PURE__ */ i(s, { defaultVariant: "bodyLg", mobileVariant: "bodyMd", emphasis: !0, children: y }),
      /* @__PURE__ */ i("div", { className: m(a.actions, a.desktop), children: c.map((e, l) => /* @__PURE__ */ i(n, { ...e, size: "lg", analyticsProps: o(e, l), children: e.label }, l)) }),
      /* @__PURE__ */ i("div", { className: m(a.actions, a.mobile), children: c.map((e, l) => /* @__PURE__ */ i(n, { ...e, size: "md", analyticsProps: o(e, l), children: e.label }, l)) })
    ] })
  ] });
};
export {
  T as ProductListing
};
