import { PaymentAlert as a } from "./accelbyte-widgets493.mjs";
import { WebViewClient as i } from "./accelbyte-widgets673.mjs";
import { PaymentProvider as o, PaymentType as m } from "./accelbyte-widgets494.mjs";
import { AlertType as u } from "./accelbyte-widgets128.mjs";
import r from "react";
import d from "./accelbyte-widgets674.mjs";
import f from "./accelbyte-widgets675.mjs";
import c from "./accelbyte-widgets676.mjs";
import P from "./accelbyte-widgets677.mjs";
import l from "./accelbyte-widgets678.mjs";
const T = ({ activePaymentMethod: n, paymentUrl: e, paymentOrderDetails: t }) => {
  if (!e)
    return /* @__PURE__ */ r.createElement(f, { paymentOrderDetails: t, paymentProvider: n.paymentProvider });
  if (e.paymentProvider === o.enum.ADYEN)
    return /* @__PURE__ */ r.createElement(d, { paymentOrderDetails: t, paymentUrl: e });
  if (e.paymentProvider === o.enum.STRIPE)
    return /* @__PURE__ */ r.createElement(l, { paymentOrderDetails: t, paymentUrl: e });
  if (e.paymentProvider === o.enum.PAYPAL)
    return /* @__PURE__ */ r.createElement(c, { paymentUrl: e });
  switch (e.paymentType) {
    case m.enum.LINK:
      return /* @__PURE__ */ r.createElement(i, { url: e.paymentUrl || void 0 });
    case m.enum.QR_CODE:
      return /* @__PURE__ */ r.createElement(P, { paymentUrl: e });
    default:
      return /* @__PURE__ */ r.createElement(
        a,
        {
          type: u.warning,
          message: "No payment method available for this purchase, Please contact our administrator if you see this error"
        }
      );
  }
};
export {
  T as default
};
