import { jsx as r, jsxs as u } from "react/jsx-runtime";
import { createContext as w, useContext as C } from "react";
import { a as f } from "./heading-gqtQNo5n.mjs";
import { a as y } from "./checkmark.es-DdgIZN2R.mjs";
import { a as B } from "./paragraph-DNtj7OLr.mjs";
import { c as k } from "./bind-CU-R61T-.mjs";
const G = {
  "purpur-content-block": "_purpur-content-block_mjbqd_1",
  "purpur-content-block--reverse": "_purpur-content-block--reverse_mjbqd_13",
  "purpur-content-block__section": "_purpur-content-block__section_mjbqd_20",
  "purpur-content-block__image-wrapper": "_purpur-content-block__image-wrapper_mjbqd_28",
  "purpur-content-block__video-wrapper": "_purpur-content-block__video-wrapper_mjbqd_31",
  "purpur-content-block__content-wrapper": "_purpur-content-block__content-wrapper_mjbqd_41",
  "purpur-content-block__badge-wrapper": "_purpur-content-block__badge-wrapper_mjbqd_46",
  "purpur-content-block__content": "_purpur-content-block__content_mjbqd_41",
  "purpur-content-block__list": "_purpur-content-block__list_mjbqd_52",
  "purpur-content-block__list-item": "_purpur-content-block__list-item_mjbqd_57",
  "purpur-content-block__list-item-icon": "_purpur-content-block__list-item-icon_mjbqd_65",
  "purpur-content-block__actions": "_purpur-content-block__actions_mjbqd_68",
  "purpur-content-block--negative": "_purpur-content-block--negative_mjbqd_79",
  "purpur-content-block__text-spacing": "_purpur-content-block__text-spacing_mjbqd_79"
}, z = {
  "purpur-content-block-group": "_purpur-content-block-group_xzyy2_1"
}, P = k.bind(z), d = "purpur-content-block-group", v = w(null), g = ({
  children: p,
  className: n,
  negative: o,
  mediaStartPosition: c = "left",
  ..._
}) => {
  const l = P([
    d,
    {
      [`${d}--negative`]: o
    },
    n
  ]);
  return /* @__PURE__ */ r("div", { className: l, ..._, children: /* @__PURE__ */ r(
    v.Provider,
    {
      value: { negative: o, reverse: c === "right" },
      children: p
    }
  ) });
};
g.displayName = "ContentBlockGroup";
const e = k.bind(G), t = "purpur-content-block", h = ({
  className: p,
  negative: n,
  image: o,
  video: c,
  badge: _,
  beforeTitle: l,
  title: a,
  actions: i,
  listItems: m,
  headingTag: N = "h2",
  headingVariant: $ = "title-300",
  children: j,
  ...q
}) => {
  const b = C(v), x = e([
    t,
    {
      [`${t}--negative`]: b?.negative || n,
      [`${t}--reverse`]: b?.reverse
    },
    p
  ]);
  return /* @__PURE__ */ u("div", { className: x, ...q, children: [
    /* @__PURE__ */ r("div", { className: e(`${t}__section`), children: c ? /* @__PURE__ */ r("div", { className: e(`${t}__video-wrapper`), children: c }) : /* @__PURE__ */ r("div", { className: e(`${t}__image-wrapper`), children: o }) }),
    /* @__PURE__ */ r("div", { className: e(`${t}__section`), children: /* @__PURE__ */ u("div", { className: e(`${t}__content-wrapper`), children: [
      _ && /* @__PURE__ */ r("div", { className: e(`${t}__badge-wrapper`), children: _ }),
      l,
      a?.trim() && /* @__PURE__ */ r(f, { variant: $, tag: N, negative: n, children: a }),
      /* @__PURE__ */ r("div", { className: e(`${t}__content`), children: j }),
      !!m?.length && /* @__PURE__ */ r("ul", { className: e(`${t}__list`), children: m.map(
        (s) => s && /* @__PURE__ */ u("li", { className: e(`${t}__list-item`), children: [
          /* @__PURE__ */ r(y, { size: "xs", className: e(`${t}__list-item-icon`) }),
          /* @__PURE__ */ r(B, { negative: n, children: s })
        ] }, s)
      ) }),
      i && /* @__PURE__ */ r("div", { className: e(`${t}__actions`), children: i })
    ] }) })
  ] });
};
h.Group = g;
h.displayName = "ContentBlock";
export {
  h as C
};
//# sourceMappingURL=content-block-DUcjAZgG.mjs.map
