import { requestClient, fullUrl } from '#/api/request';

/**
 * 获取礼物列表
 * @param param 查询参数，包含roomId（可选）
 */
async function getGiftList(param) {
  return requestClient.post('/auth/GiftService/getGiftList', param);
}

/**
 * 根据ID获取礼物信息
 * @param param 查询参数，包含giftId
 */
async function getGiftDetail(param) {
  return requestClient.post('/auth/GiftService/getGiftDetail', param);
}

/**
 * 赠送礼物
 * @param param 赠送礼物参数
 */
async function sendGift(param) {
  return requestClient.post('/auth/GiftService/sendGift', param);
}

/**
 * 重置礼物缓存
 */
async function resetCache() {
  return requestClient.post('/auth/GiftService/resetCache');
}

/**
 * 清空礼物缓存
 */
async function clearGiftCache() {
  return requestClient.post('/auth/GiftService/clearGiftCache');
}

export const giftService = {
  getGiftList,
  getGiftDetail,
  sendGift,
  resetCache,
  clearGiftCache
}