var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/walletList/serve.ts
var serve_exports = {};
__export(serve_exports, {
  batchGetWalletBalance: () => batchGetWalletBalance,
  getFormConfig: () => getFormConfig,
  getHolderList: () => getHolderList,
  getWalletBalance: () => getWalletBalance,
  getWalletList: () => getWalletList,
  getWalletShopList: () => getWalletShopList,
  updateWalletHolder: () => updateWalletHolder
});
module.exports = __toCommonJS(serve_exports);
var import_utils = require("./../../utils");
var getWalletList = async () => {
  try {
    const { data } = await import_utils.request.getRequest().get("/h5/wallet", {
      with: ["holder.detail"]
    });
    return data || [];
  } catch (error) {
    return [];
  }
};
var getWalletBalance = async () => {
  try {
    const { data } = await import_utils.request.getRequest().get("/h5/wallet/wallet-pass/balance", {});
    return data || null;
  } catch (error) {
    return null;
  }
};
var batchGetWalletBalance = async (walletIds) => {
  try {
    const { data } = await import_utils.request.getRequest().get("/h5/wallet/wallet-pass/balance/batch", {
      wallet_id: walletIds
    });
    return data || {};
  } catch (error) {
    return {};
  }
};
var getWalletShopList = async (params) => {
  try {
    const { data } = await import_utils.request.getRequest().get("/h5/wallet/shop/list", params || {}, {
      // abort: true,
      useCache: true
    });
    return data || null;
  } catch (error) {
    return null;
  }
};
var getHolderList = async (params) => {
  try {
    const { data } = await import_utils.request.getRequest().get("/h5/form/data/v1", params || {});
    return data || null;
  } catch (error) {
  }
};
var updateWalletHolder = async (id, params) => {
  try {
    const { data } = await import_utils.request.getRequest().post(`/h5/wallet/detail/${id}/bind-holder`, params || {});
    return data || null;
  } catch (error) {
  }
};
var getFormConfig = async (formId) => import_utils.request.getRequest().get(`/h5/form/${formId}`, {});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  batchGetWalletBalance,
  getFormConfig,
  getHolderList,
  getWalletBalance,
  getWalletList,
  getWalletShopList,
  updateWalletHolder
});
