import { jsx as i, jsxs as l } from "react/jsx-runtime";
import { cn as y } from "../../utils/cn/cn.es.js";
import { COLORS as c } from "./constants.es.js";
import a from "../../modules/ImageWithText/imageWithText.module.css";
import { HighlightedTitle as V } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
import { Typography as r } from "../../components/Typography/Typography.es.js";
import { ButtonWithColors as p } from "./components/ButtonWithColors/ButtonWithColors.es.js";
const k = ({
  image: g,
  text: t,
  title: m,
  view: e,
  colorScheme: N,
  textColor: f,
  mobileTextColor: b,
  titleColor: s,
  mobileTitleColor: n,
  titleHighlightColor: d,
  mobileTitleHighlightColor: o,
  mobileImage: u,
  button: h
}) => /* @__PURE__ */ i("section", { className: a.root, "data-scheme": N, children: /* @__PURE__ */ l("div", { className: a.container, "data-view": e, children: [
  /* @__PURE__ */ l("div", { className: a.imageContainer, children: [
    /* @__PURE__ */ i("img", { src: g, alt: "background image", className: a.image, "data-color": f }),
    /* @__PURE__ */ i("img", { src: u || g, alt: "mobile background image", className: a.mobileImage })
  ] }),
  /* @__PURE__ */ l(
    "div",
    {
      className: y(a.content, {
        [a.textAlignLeft]: e === "plain" || e === "plain_with_title",
        [a.textAlignRight]: e === "complex"
      }),
      "data-view": e,
      "data-text-color": f,
      "data-mobile-text-color": b,
      "data-title-color": s,
      "data-mobile-title-color": n,
      "data-title-highlight-color": d,
      "data-mobile-title-highlight-color": o,
      children: [
        e === "complex" && /* @__PURE__ */ l(
          "div",
          {
            className: a.richTextContainer,
            style: {
              "--highlight-color-custom": c[s || "white"],
              "--highlight-emphasize-custom": c[d || "white"],
              "--highlight-color-custom-mobile": c[n || "white"],
              "--highlight-emphasize-custom-mobile": c[o || "white"]
            },
            children: [
              m && /* @__PURE__ */ i(
                V,
                {
                  colorScheme: s || d || n || o ? "custom" : "dark",
                  className: a.richTextTitle,
                  title: m,
                  as: "div",
                  defaultVariant: "displayXs",
                  mobileVariant: "headingXl"
                }
              ),
              t && /* @__PURE__ */ i(r, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", children: t }),
              /* @__PURE__ */ i(p, { ...h })
            ]
          }
        ),
        e === "plain" && t && /* @__PURE__ */ l("div", { className: a.textContainer, children: [
          /* @__PURE__ */ i(
            r,
            {
              as: "p",
              defaultVariant: "headingXl",
              mobileVariant: "headingXs",
              className: a.textOfPlain,
              children: t
            }
          ),
          /* @__PURE__ */ i(p, { ...h })
        ] }),
        e === "plain_with_title" && /* @__PURE__ */ l("div", { className: a.plainWithTitleContainer, children: [
          m && /* @__PURE__ */ i(
            r,
            {
              as: "h3",
              defaultVariant: "displaySm",
              mobileVariant: "headingXl",
              className: a.titleOfPlainWithTitle,
              children: m
            }
          ),
          t && /* @__PURE__ */ i(
            r,
            {
              as: "p",
              defaultVariant: "bodyMd",
              mobileVariant: "bodyMd",
              className: a.textOfPlainWithTitle,
              children: t
            }
          ),
          /* @__PURE__ */ i(p, { ...h })
        ] })
      ]
    }
  )
] }) });
export {
  k as ImageWithText
};
