import { jsxs as p, jsx as o } from "react/jsx-runtime";
import { classNames as h } from "./index-classNames.js";
import { ComponentContainer as B } from "./index-ComponentContainer.js";
import "react";
import { GradientPrimaryMeshBackground as y } from "./index-GradientPrimaryMeshBackground.js";
import t from "./index-PageSection.module.scss.js";
import { HeaderTypes as b, Header as V } from "./index-Header.js";
import { Render as u } from "./index-Render.js";
import { FrostedGlass as G } from "./index-FrostedGlass.js";
var e;
(function(r) {
  r.frostedGlass = "frostedGlass", r.functionalBg = "functionalBg", r.transparent = "transparent", r.gradientPrimaryMesh = "gradientPrimaryMesh", r.gradientBgVarTop = "gradientBgVarTop", r.gradientBgVarBottom = "gradientBgVarBottom";
})(e || (e = {}));
var i;
(function(r) {
  r.top = "top", r.bottom = "bottom", r.both = "both";
})(i || (i = {}));
const j = (r) => {
  const {
    title: a,
    description: c,
    replacements: d,
    headerType: l = b.sectionHeader,
    headerActionArea: s,
    children: m,
    testId: n,
    isVisible: f = !0
  } = r;
  return f ? p(T, {
    ...r,
    children: [(a || s) && p("div", {
      className: t.header,
      children: [o(u, {
        if: !!a,
        children: o(V, {
          title: a,
          type: l,
          description: c,
          replacements: d,
          testId: n
        })
      }), o(u, {
        if: !!s,
        children: s
      })]
    }), o("div", {
      "data-testid": n ? `${n}_Children` : void 0,
      children: m
    })]
  }) : null;
}, T = (r) => {
  const {
    testId: a,
    className: c,
    background: d = e.functionalBg,
    children: l,
    innerRef: s,
    noDefaultPadding: m,
    roundedEdges: n
  } = r, f = () => {
    switch (d) {
      case e.frostedGlass:
        return t.frostedGlass;
      case e.functionalBg:
        return t.functionalBg;
      case e.gradientPrimaryMesh:
        return t.gradientPrimaryMesh;
      case e.transparent:
        return t.transparent;
      case e.gradientBgVarTop:
        return t.gradientBgVarTop;
      case e.gradientBgVarBottom:
        return t.gradientBgVarBottom;
      default:
        return t.functionalBg;
    }
  }, g = h(t.container, f(), !m && t.defaultPadding, (n === i.top || n === i.both) && t.roundedTop, (n === i.bottom || n === i.both) && t.roundedBottom, c);
  return d === e.frostedGlass ? o(G, {
    testId: a,
    className: g,
    innerRef: s,
    children: l
  }) : p(B, {
    testId: a,
    className: g,
    innerRef: s,
    children: [d === e.gradientPrimaryMesh && o(y, {}), l]
  });
};
export {
  j as PageSection,
  e as PageSectionBackground,
  i as PageSectionRoundedEdges
};
