import { PaymentVendorFactoryEnum } from "../../../enums/paymentVendorFactoryEnum.mjs";
import { ICheckForm } from "./vendorsForms/ICheckForm.mjs";
import { FiservForm } from "./vendorsForms/FiservForm.mjs";
import { PaymentusForm } from "./vendorsForms/PaymentusForm.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
//#region src/utilities/form/paymentForm/usePaymentProviderForm.tsx
/**
* useProviderForm
*
* @param {(PaymentTenderTypeEnum | undefined)} paymentMethod
* @param {*} providerType
* @param {*} providerProps
* @param {(paymentFormResult: any) => void} onStatusChange
* @return {*}  {*}
*/
const usePaymentProviderForm = (paymentMethod, providerType, providerProps, onStatusChange, paymentDetails, data) => {
	const $ = c(19);
	switch (providerType) {
		case PaymentVendorFactoryEnum.ICheck: {
			let t0;
			if ($[0] !== data || $[1] !== onStatusChange || $[2] !== paymentDetails || $[3] !== paymentMethod || $[4] !== providerProps) {
				t0 = /* @__PURE__ */ React.createElement(ICheckForm, {
					paymentMethod,
					onStatusChange,
					paymentDetails,
					paymentData: data,
					...providerProps
				});
				$[0] = data;
				$[1] = onStatusChange;
				$[2] = paymentDetails;
				$[3] = paymentMethod;
				$[4] = providerProps;
				$[5] = t0;
			} else t0 = $[5];
			return t0;
		}
		case PaymentVendorFactoryEnum.Fiserv: {
			let t0;
			if ($[6] !== data || $[7] !== onStatusChange || $[8] !== paymentMethod || $[9] !== providerProps) {
				t0 = /* @__PURE__ */ React.createElement(FiservForm, {
					paymentMethod,
					onStatusChange,
					paymentData: data,
					...providerProps
				});
				$[6] = data;
				$[7] = onStatusChange;
				$[8] = paymentMethod;
				$[9] = providerProps;
				$[10] = t0;
			} else t0 = $[10];
			return t0;
		}
		case PaymentVendorFactoryEnum.Paymentus: {
			let t0;
			if ($[11] !== data || $[12] !== onStatusChange || $[13] !== paymentDetails || $[14] !== paymentMethod || $[15] !== providerProps) {
				t0 = /* @__PURE__ */ React.createElement(PaymentusForm, {
					paymentMethod,
					onStatusChange,
					paymentDetails,
					paymentData: data,
					...providerProps
				});
				$[11] = data;
				$[12] = onStatusChange;
				$[13] = paymentDetails;
				$[14] = paymentMethod;
				$[15] = providerProps;
				$[16] = t0;
			} else t0 = $[16];
			return t0;
		}
		case PaymentVendorFactoryEnum.Stripe: {
			let t0;
			if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
				t0 = /* @__PURE__ */ React.createElement(React.Fragment, null);
				$[17] = t0;
			} else t0 = $[17];
			return t0;
		}
		case PaymentVendorFactoryEnum.AuthorizeNet: {
			let t0;
			if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
				t0 = /* @__PURE__ */ React.createElement(React.Fragment, null);
				$[18] = t0;
			} else t0 = $[18];
			return t0;
		}
		default: return null;
	}
};
//#endregion
export { usePaymentProviderForm };

//# sourceMappingURL=usePaymentProviderForm.mjs.map