import { K as i, a3 as c, j as e, b4 as u, H as d, b5 as w } from "./index-b203ecbb.js";
import { useMemo as b, Suspense as v } from "react";
const M = i`
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  color: ${c("grayBlue-04")};
  font-size: 16px;
  padding: 0 16px;
  font-weight: 500;

  span {
    display: flex;
    align-items: center;
  }
`, B = i`
  flex-grow: 1;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
`, N = i`
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`, S = i`
  display: flex;
  justify-content: center;
  align-items: center;
  width: 14px;
  height: 14px;
  color: ${c("grayBlue-02")};
  cursor: pointer;
`, j = i`
  width: 400px;
`, C = i`
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-bottom: 12px;
`, p = (l) => {
  const { childrenSetter: t, widgetDisplayName: a, attrPath: s } = l;
  return /* @__PURE__ */ e("div", { css: C, children: t == null ? void 0 : t.map((n) => {
    const { id: o } = n;
    return /* @__PURE__ */ e(
      u,
      {
        config: n,
        displayName: a ?? "",
        parentAttrName: s,
        guideInfo: ""
      },
      `${o}-${a}`
    );
  }) });
};
p.displayName = "ModalBody";
const h = (l) => {
  const { title: t, handleCloseModal: a, docLink: s } = l;
  return /* @__PURE__ */ d("div", { css: M, children: [
    /* @__PURE__ */ d("div", { css: B, children: [
      /* @__PURE__ */ e("div", { css: N, children: t }),
      s && /* @__PURE__ */ e("div", { children: "DocsIcon" })
    ] }),
    /* @__PURE__ */ e("div", { css: S, onClick: a, children: /* @__PURE__ */ e(w, {}) })
  ] });
};
h.displayName = "ModalHeader";
const H = (l) => {
  const {
    title: t,
    handleCloseModal: a,
    childrenSetter: s,
    widgetDisplayName: n,
    attrPath: o,
    children: r,
    _css: x,
    header: m,
    extraElement: y,
    docLink: g
  } = l, f = b(() => !s || !n || !o ? r : /* @__PURE__ */ e(
    p,
    {
      childrenSetter: s,
      widgetDisplayName: n,
      attrPath: o
    }
  ), [s, n, o, r]);
  return /* @__PURE__ */ d("div", { css: i(j, x), children: [
    m ?? /* @__PURE__ */ e(
      h,
      {
        title: t,
        handleCloseModal: a,
        docLink: g
      }
    ),
    /* @__PURE__ */ e(v, { children: f }),
    y
  ] });
};
H.displayName = "BaseModal";
export {
  H as B
};
//# sourceMappingURL=index-ba865a7a.js.map
