import { jsx as e, jsxs as c, Fragment as f } from "react/jsx-runtime";
import { isEmpty as N } from "es-toolkit/compat";
import s from "../../utils/classNames.js";
import r from "./StateButton.js";
import g from "./StateIcon.js";
import { hasPaddingClass as x } from "../../utils/hasUtilityClass.js";
const W = {
  left: "justify-content-start",
  center: "justify-content-center",
  right: "justify-content-end"
}, $ = (t) => {
  if (!N(t))
    return t.length === 1 ? /* @__PURE__ */ e("div", { className: "btn-toolbar margin-top-20", children: /* @__PURE__ */ e(r, { ...t[0] }) }) : t.length === 2 ? /* @__PURE__ */ e("div", { className: "btn-toolbar margin-top-20 justify-content-center-xs", children: t.map((a, n) => /* @__PURE__ */ e(r, { ...a }, n)) }) : /* @__PURE__ */ c(f, { children: [
      /* @__PURE__ */ c("div", { className: "btn-toolbar margin-top-20 justify-content-center-xs", children: [
        /* @__PURE__ */ e(r, { ...t[0] }, "1"),
        /* @__PURE__ */ e(r, { ...t[1] }, "2")
      ] }),
      /* @__PURE__ */ e("div", { className: "btn-toolbar", children: t.map((a, n) => n > 1 && /* @__PURE__ */ e(r, { ...a }, n)) })
    ] });
}, L = (t) => {
  const {
    icon: a,
    icons: n = [],
    image: l,
    headline: o,
    message: d,
    buttons: u = [],
    alignment: w = "center",
    fullWidth: v = !1,
    condensed: i = !1,
    outerClassName: m = "",
    innerClassName: h = "",
    children: p,
    ...y
  } = t, C = s(
    "margin-0",
    "width-100pct",
    !v && "max-width-600",
    "panel-default",
    "panel",
    x(m) ? "" : i ? "padding-10" : "padding-15",
    m
  ), b = s(
    "display-flex",
    "flex-column",
    "align-items-center",
    "text-center",
    x(h) ? "" : i ? "padding-15" : "padding-25",
    h
  ), j = s(i ? "text-size-16 margin-bottom-10" : "text-size-h2 margin-bottom-20"), z = s(
    i ? "text-size-16 margin-bottom-10" : "text-size-h2 margin-bottom-20",
    "display-flex",
    "align-items-center",
    "max-width-100pct"
  ), I = s(
    i ? "text-size-h4" : "text-size-h3 text-size-h2-xl",
    "line-height-125rel",
    "text-color-dark",
    "text-medium",
    "width-500",
    "max-width-100pct",
    "text-wrap-balance"
  ), S = /* @__PURE__ */ e(f, { children: a && /* @__PURE__ */ e("div", { className: j, children: /* @__PURE__ */ e(g, { name: a }) }) }), k = /* @__PURE__ */ e("div", { className: z, children: n.map((F, H) => /* @__PURE__ */ e(g, { ...F }, H)) }), B = /* @__PURE__ */ e("div", { className: "width-500 max-width-100pct margin-top-25", children: p }), M = /* @__PURE__ */ e("div", { className: I, children: o }), O = /* @__PURE__ */ e("div", { className: "text-color-dark margin-top-15 width-500 max-width-100pct text-wrap-balance", children: d }), P = N(n) ? S : k, E = l || P;
  return /* @__PURE__ */ e("div", { className: `display-flex ${W[w]} max-width-100pct`, ...y, children: /* @__PURE__ */ e("div", { className: C, children: /* @__PURE__ */ c("div", { className: b, children: [
    E,
    o && M,
    d && O,
    $(u),
    p && B
  ] }) }) });
};
export {
  L as default
};
//# sourceMappingURL=CustomState.js.map
