import type { ComponentType } from "react";
import type { RechargeModalProps } from "./RechargeModal";

export type RechargeModalComponent = ComponentType<RechargeModalProps>;

let rechargeModalPromise: Promise<RechargeModalComponent> | null = null;

export function loadRechargeModal(): Promise<RechargeModalComponent> {
  if (!rechargeModalPromise) {
    rechargeModalPromise = import("./RechargeModal").then((module) => module.RechargeModal);
  }

  return rechargeModalPromise;
}
