import http from "@/api";

/**
 * @name 好友优惠券管理模块
 */

// 获取好友优惠券列表
export const getFriendCouponList = (params: any) => {
  return http.post(`/life-discount-coupon-store-friend/getReceivedSendFriendCouponList`, params);
};

// 赠送优惠券给好友
export const sendCouponToFriend = (params: { friendId: string | number; couponId: string | number; quantity: number }) => {
  return http.post(`/api/friendCoupon/send`, params);
};

// 删除好友优惠券记录
export const deleteFriendCoupon = (params: { id: string | number }) => {
  return http.post(`/api/friendCoupon/delete`, params);
};

// 获取好友列表
export const getFriendList = () => {
  return http.get(`/api/friendCoupon/friendList`);
};

// 获取可赠送的优惠券列表
export const getAvailableCouponList = () => {
  return http.get(`/api/friendCoupon/availableCoupons`);
};
