import { jsxs as a, jsx as o } from "react/jsx-runtime";
import { useDynamicImport as p } from "./index-use-dynamic-import.js";
import { mb5 as h, mb2 as x } from "./index-general.module.js";
import { classNames as r } from "./index-classNames.js";
import { AIOrb as I, AIOrbStatus as y, AIOrbSize as b } from "./index-AIOrb.js";
import { ModalHeader as k } from "./index-ModalHeader.js";
import { Render as s } from "./index-Render.js";
import "react";
import { Modal as u } from "./index-Modal.js";
import { ModalBody as N } from "./index-ModalBody.js";
import { Text as d, TextTypes as c } from "./index-Text.js";
import e from "./index-LoadingModal.module.scss.js";
const R = (m) => {
  const {
    title: f,
    message: l = "Loading...",
    loadingAnimation: i = "default",
    headerTitle: n
  } = m;
  let t = "";
  i === "default" ? t = "gifs/loading.gif" : i === "rocket" && (t = "gifs/rocket.gif");
  const {
    SvgIcon: g,
    loading: T,
    error: A
  } = p(t);
  return a(u, {
    width: "672px",
    ...m,
    children: [n && o(k, {
      title: n
    }), a(N, {
      className: r(e.modal),
      children: [a("div", {
        className: r(e.imgContainer),
        children: [o(s, {
          if: i !== "ai",
          children: o("img", {
            className: r(e.loadingImg, h, i === "rocket" && e.rocket),
            src: g,
            alt: "loading..."
          })
        }), o(s, {
          if: i === "ai",
          children: o(I, {
            size: b.Large,
            state: y.Thinking
          })
        })]
      }), o(d, {
        className: r(x),
        type: c.textIntro,
        color: "--fn-fg-cta",
        children: f
      }), o(d, {
        type: c.text,
        children: l || "Loading..."
      })]
    })]
  });
};
export {
  R as LoadingModal
};
