import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import useLogger from "../../../hooks/useLogger.js";
import { useMemoizedFn } from "ahooks";
//#region src/components/checkout/hooks/usePaymentLogger.ts
const usePaymentLogger = () => {
	const logger = useLogger();
	const addLog = useMemoizedFn((data) => {
		try {
			var _logger$addLog;
			logger === null || logger === void 0 || (_logger$addLog = logger.addLog) === null || _logger$addLog === void 0 || _logger$addLog.call(logger, data);
		} catch (error) {
			console.error("Failed to add payment log:", error);
		}
	});
	return _objectSpread2(_objectSpread2({}, logger), {}, { addLog });
};
//#endregion
export { usePaymentLogger as default };
