using HoneyBox.Model.Models.UserCoupon;
using HoneyBox.Model.Models.Coupon;

namespace HoneyBox.Core.Interfaces;

/// <summary>
/// 优惠券服务接口
/// </summary>
public interface ICouponService
{
    /// <summary>
    /// 获取优惠券列表
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="status">状态: 1=未使用, 2=已分享</param>
    /// <param name="page">页码</param>
    /// <param name="limit">每页数量</param>
    /// <returns>优惠券列表响应</returns>
    Task<UserCouponListResponse> GetCouponListAsync(int userId, int status, int page, int limit = 15);

    /// <summary>
    /// 获取优惠券详情
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="couponId">优惠券ID</param>
    /// <returns>优惠券详情响应</returns>
    Task<CouponDetailResponse> GetCouponDetailAsync(int userId, int couponId);

    /// <summary>
    /// 分享优惠券
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="couponId">优惠券ID</param>
    /// <returns>是否成功</returns>
    Task<bool> ShareCouponAsync(int userId, int couponId);

    /// <summary>
    /// 领取优惠券
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="couponId">优惠券ID</param>
    /// <returns>领取结果</returns>
    Task<ClaimCouponResponse> ClaimCouponAsync(int userId, int couponId);

    /// <summary>
    /// 计算合成结果
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="couponIds">优惠券ID列表 (逗号分隔)</param>
    /// <returns>合成计算结果</returns>
    Task<SynthesisCalculateResponse> CalculateSynthesisAsync(int userId, string couponIds);

    /// <summary>
    /// 执行优惠券合成
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="couponIds">优惠券ID列表 (逗号分隔)</param>
    /// <returns>是否成功</returns>
    Task<bool> SynthesisCouponsAsync(int userId, string couponIds);

    /// <summary>
    /// 批量领取优惠券
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="couponIds">优惠券ID列表 (逗号分隔)</param>
    /// <returns>是否成功</returns>
    Task<bool> BatchReceiveCouponsAsync(int userId, string couponIds);

    /// <summary>
    /// 获取可领取的优惠券列表
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <returns>可领取优惠券列表</returns>
    Task<AvailableCouponListResponse> GetAvailableCouponsAsync(int userId);

    /// <summary>
    /// 获取可使用的优惠券列表
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="request">请求参数</param>
    /// <returns>可使用优惠券列表</returns>
    Task<UsableCouponListResponse> GetUsableCouponsAsync(int userId, UsableCouponListRequest request);

    /// <summary>
    /// 获取领券中心优惠券列表
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="request">请求参数</param>
    /// <returns>领券中心优惠券列表</returns>
    Task<UserCouponListResponse> GetCouponCenterListAsync(int userId, CouponCenterListRequest request);

    /// <summary>
    /// 领取领券中心优惠券
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="couponId">优惠券ID</param>
    /// <returns>领取结果</returns>
    Task<ClaimCouponResponse> ReceiveCouponCenterAsync(int userId, int couponId);

    /// <summary>
    /// 获取待领取优惠券数量
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <returns>待领取优惠券数量</returns>
    Task<int> GetPendingCouponCountAsync(int userId);
}
