const require_PaymentResultToastUtils = require("./utils/PaymentResultToastUtils.js");
//#region src/components/checkout/payment-result-flow.ts
function buildPaymentResultToastParams({ paymentStatus, orderTotalAmount, gapAmount, changeGivenAmount, failureReason, isModalMode }) {
	if (!paymentStatus) return null;
	const autoCloseConfig = require_PaymentResultToastUtils.calculateAutoCloseConfig(paymentStatus, !!Number(changeGivenAmount || 0));
	if (isModalMode) {
		autoCloseConfig.autoClose = false;
		autoCloseConfig.autoCloseDelay = 0;
		autoCloseConfig.maskClosable = false;
	}
	return {
		statusClassName: require_PaymentResultToastUtils.calculateStatusClassName(paymentStatus),
		paymentStatus,
		orderTotalAmount: Number(orderTotalAmount || 0),
		gapAmount: paymentStatus === "partially_paid" ? Number(gapAmount || 0) : Number(changeGivenAmount || 0),
		failureReason,
		autoCloseConfig
	};
}
//#endregion
exports.buildPaymentResultToastParams = buildPaymentResultToastParams;
