import { jsxs as t, jsx as o } from "react/jsx-runtime";
/* empty css                      */
import { useDynamicImport as u } from "./index-use-dynamic-import.js";
import { mt5 as x, mb3 as v, alignItemsCenter as y, dFlexColumn as w } from "./index-general.module.js";
import { classNames as i } from "./index-classNames.js";
import { supportService as I } from "./index-support.service.js";
import { IconNames as M } from "./index-IconNames.js";
import { ModalFooter as N } from "./index-ModalFooter.js";
import { ModalHeader as F } from "./index-ModalHeader.js";
import { generateErrorBoundaryData as P } from "./index-generate-error-boundary-data.js";
import { useEffect as T } from "react";
import { Modal as b } from "./index-Modal.js";
import { ModalBody as E } from "./index-ModalBody.js";
import { Text as n, FontWeights as m, TextTypes as a } from "./index-Text.js";
const G = (e) => {
  const {
    close: s,
    title: c = "Oh snap! Something went wrong!",
    message: p = "The application has encountered an unknown error. Please contact customer support for further help.",
    ctaPosition: l = "center",
    ctaPositive: d = {
      text: "contact our support",
      cta: () => {
        I.show();
      },
      icon: M.arrowRight
    },
    err: r,
    ctaNegative: f,
    source: g
  } = e, {
    SvgIcon: h
  } = u("gifs/error.gif");
  return T(() => {
    P("error_modal_logs", void 0, r, void 0, g);
  }, [r]), t(b, {
    width: "600px",
    ...e,
    children: [o(F, {
      type: "danger",
      closeFn: s,
      children: o(n, {
        type: a.heading3,
        fontWeight: m.bold,
        children: c
      })
    }), o(E, {
      children: t("div", {
        className: i(w, y),
        children: [o("img", {
          className: i(v, x),
          src: h,
          alt: ""
        }), o(n, {
          type: a.textIntro,
          textAlign: "center",
          fontWeight: m.medium,
          children: p
        })]
      })
    }), o(N, {
      buttonsPosition: l,
      positive: d,
      negative: f
    })]
  });
};
export {
  G as ErrorModal
};
