import { jsx as e, jsxs as d } from "react/jsx-runtime";
/* empty css                        */
import { dFlexColumn as f } from "./index-general.module.js";
import { classNames as x } from "./index-classNames.js";
import { Text as h, TextTypes as C } from "./index-Text.js";
import "react";
import { ComponentContainer as v } from "./index-ComponentContainer.js";
import { Modal as N } from "./index-Modal.js";
import { ModalBody as g } from "./index-ModalBody.js";
import { ModalFooter as y } from "./index-ModalFooter.js";
import { ModalHeader as M } from "./index-ModalHeader.js";
const I = (a) => {
  const {
    close: t,
    message: o,
    title: n,
    positiveCtaText: r,
    negativeCtaText: i,
    headerType: l,
    positiveIconLeft: p,
    replacements: m,
    customNegativeFn: s,
    hideHeaderCloseBtn: c = !1
  } = a;
  return e(v, {
    className: "ConfirmModal-container",
    children: d(N, {
      className: "confirm-modal",
      width: "672px",
      children: [e(M, {
        hideHeaderCloseBtn: c,
        type: l,
        closeFn: t,
        title: n,
        replacements: m
      }), e(g, {
        children: e("div", {
          className: x(f),
          children: typeof o == "string" ? e(h, {
            textAlign: "center",
            type: C.text,
            replacements: m,
            children: o
          }) : o
        })
      }), e(y, {
        positive: {
          cta: () => {
            t({
              isOk: !0
            });
          },
          text: r === "" ? "Yes" : r ?? "Yes",
          icon: p ?? void 0
        },
        negative: {
          cta: s || (() => {
            t({
              isOk: !1
            });
          }),
          text: i === "" ? "No" : i ?? "No"
        }
      })]
    })
  });
};
export {
  I as ConfirmModal
};
