import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
import { request } from "../../utils/index.js";
//#region src/components/walletList/serve.ts
/**
* 获取 wallet 列表
* @param params
* @returns
*/
const getWalletList = function() {
	var _ref = _asyncToGenerator(function* () {
		try {
			const { data } = yield request.getRequest().get("/h5/wallet", { with: ["holder.detail"] });
			return data || [];
		} catch (error) {
			return [];
		}
	});
	return function getWalletList() {
		return _ref.apply(this, arguments);
	};
}();
(function() {
	var _ref2 = _asyncToGenerator(function* () {
		try {
			const { data } = yield request.getRequest().get("/h5/wallet/wallet-pass/balance", {});
			return data || null;
		} catch (error) {
			return null;
		}
	});
	return function getWalletBalance() {
		return _ref2.apply(this, arguments);
	};
})();
/**
* 批量获取钱包余额信息
*/
const batchGetWalletBalance = function() {
	var _ref3 = _asyncToGenerator(function* (walletIds) {
		try {
			const { data } = yield request.getRequest().get("/h5/wallet/wallet-pass/balance/batch", { wallet_id: walletIds });
			return data || {};
		} catch (error) {
			return {};
		}
	});
	return function batchGetWalletBalance(_x) {
		return _ref3.apply(this, arguments);
	};
}();
/**
* @title: 获取钱包店铺列表
* @description:
* @return {*}
* @Author: WangHan
* @Date: 2025-06-09 11:12
*/
const getWalletShopList = function() {
	var _ref4 = _asyncToGenerator(function* (params) {
		try {
			const { data } = yield request.getRequest().get("/h5/wallet/shop/list", params || {}, { useCache: true });
			return data || null;
		} catch (error) {
			return [];
		}
	});
	return function getWalletShopList(_x2) {
		return _ref4.apply(this, arguments);
	};
}();
/**
* @title: 获取持有人列表
* @description: 获取持有人列表
* @param params 查询参数
* @returns 持有人列表
*/
const getHolderList = function() {
	var _ref5 = _asyncToGenerator(function* (params) {
		try {
			const { data } = yield request.getRequest().get("/h5/form/data/v1", params || {});
			return data || null;
		} catch (error) {}
	});
	return function getHolderList(_x3) {
		return _ref5.apply(this, arguments);
	};
}();
/**
* 更新持有人
* @param params 更新参数
* @returns 更新结果
*/
const updateWalletHolder = function() {
	var _ref6 = _asyncToGenerator(function* (id, params) {
		try {
			const { data } = yield request.getRequest().post(`/h5/wallet/detail/${id}/bind-holder`, params || {});
			return data || null;
		} catch (error) {}
	});
	return function updateWalletHolder(_x4, _x5) {
		return _ref6.apply(this, arguments);
	};
}();
/**
* 获取表单配置
* @param formId 表单ID
* @returns 表单配置
*/
const getFormConfig = function() {
	var _ref7 = _asyncToGenerator(function* (formId) {
		return request.getRequest().get(`/h5/form/${formId}`, {});
	});
	return function getFormConfig(_x6) {
		return _ref7.apply(this, arguments);
	};
}();
//#endregion
export { batchGetWalletBalance, getFormConfig, getHolderList, getWalletList, getWalletShopList, updateWalletHolder };
