using HoneyBox.Model.Models;
using HoneyBox.Model.Models.Goods;

namespace HoneyBox.Core.Interfaces;

/// <summary>
/// 收藏服务接口
/// </summary>
public interface ICollectionService
{
    /// <summary>
    /// 收藏/取消收藏商品 (PHP addCollect - 切换收藏状态)
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="goodsId">商品ID</param>
    /// <param name="goodsNum">箱号</param>
    /// <returns>操作是否成功</returns>
    Task<bool> ToggleCollectionAsync(int userId, int goodsId, int goodsNum);

    /// <summary>
    /// 获取收藏列表 (PHP listCollect)
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="type">商品类型 (0=全部)</param>
    /// <param name="page">页码</param>
    /// <param name="pageSize">每页数量</param>
    /// <returns>分页收藏列表</returns>
    Task<CollectionListResponse> GetCollectionListAsync(int userId, int type, int page, int pageSize);

    /// <summary>
    /// 删除收藏 (PHP delCollect)
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="collectionId">收藏记录ID</param>
    /// <returns>操作是否成功</returns>
    Task<bool> DeleteCollectionAsync(int userId, int collectionId);

    /// <summary>
    /// 检查是否已收藏
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="goodsId">商品ID</param>
    /// <param name="goodsNum">箱号</param>
    /// <returns>是否已收藏</returns>
    Task<bool> IsCollectedAsync(int userId, int goodsId, int goodsNum);

    /// <summary>
    /// 取消收藏 (PHP cancelCollect - 通过商品ID取消收藏)
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="goodsId">商品ID</param>
    /// <returns>操作是否成功</returns>
    Task<bool> CancelCollectionByGoodsIdAsync(int userId, int goodsId);
}
