"use client";
import { jsxs as o, jsx as t } from "react/jsx-runtime";
import { cn as m } from "../../../../utils/cn/cn.es.js";
import a from "../../../../modules/HSModal/components/MailchimpModal/mailchimpModal.module.css";
import { EAnalyticsEvent as x } from "../../../../types/analytics/analytics.es.js";
import { Typography as s } from "../../../../components/Typography/Typography.es.js";
import { Newsletter as y } from "../Newsletter/Newsletter.es.js";
const b = "https://hook.us2.make.com/1pdxfhs8945s62ritw768u66p2weqoq6", L = ({
  title: i,
  description: n,
  buttonText: c,
  image: r,
  layout: l = "plain-column",
  colorScheme: e = "light",
  onCloseCallback: p,
  onClickCallback: d,
  cancelButtonText: h = "no, thanks",
  tags: g,
  placeholder: u,
  trackingEvent: f,
  trackingLocation: k
}) => {
  const v = (N) => {
    N.stopPropagation();
  };
  return /* @__PURE__ */ o(
    "div",
    {
      className: m(a.contentWrapper, a[e]),
      "data-image-position": l,
      onClick: v,
      children: [
        /* @__PURE__ */ o("div", { className: m(a.content, a[e]), children: [
          (i || n) && /* @__PURE__ */ o("div", { className: a.text, children: [
            i && /* @__PURE__ */ t(s, { defaultVariant: "headingLg", children: i }),
            n && /* @__PURE__ */ t(s, { defaultVariant: "bodySm", children: n })
          ] }),
          /* @__PURE__ */ t(
            y,
            {
              buttonText: c,
              cancelButtonText: h,
              colorScheme: e,
              onCloseCallback: p,
              onClickCallback: d,
              tags: g,
              placeholder: u,
              trackingEvent: f || x.mailchimpSubmitClicked,
              trackingLocation: k,
              webhookUrl: b
            }
          )
        ] }),
        r && l !== "plain-column" && /* @__PURE__ */ t("div", { className: a.imageWrapper, children: /* @__PURE__ */ t("div", { style: { backgroundImage: `url(${r})` }, className: a.image }) })
      ]
    }
  );
};
export {
  L as MailchimpModal
};
