using BookmarkApi.Shared.DTOs;

namespace BookmarkApi.Core.Interfaces;

/// <summary>
/// 标签服务接口
/// </summary>
public interface ITagService
{
    /// <summary>
    /// 获取用户的所有标签及使用数量
    /// </summary>
    Task<List<TagDto>> GetUserTagsAsync(Guid userId);

    /// <summary>
    /// 获取标签详情
    /// </summary>
    Task<TagDto?> GetTagAsync(Guid tagId, Guid userId);

    /// <summary>
    /// 创建标签
    /// </summary>
    Task<TagDto> CreateTagAsync(Guid userId, string name, string? color = null, string? icon = null);

    /// <summary>
    /// 更新标签
    /// </summary>
    Task<TagDto?> UpdateTagAsync(Guid tagId, Guid userId, string? name = null, string? color = null, string? icon = null);

    /// <summary>
    /// 重命名标签
    /// </summary>
    Task<bool> RenameTagAsync(Guid userId, string oldName, string newName);

    /// <summary>
    /// 删除标签
    /// </summary>
    Task<bool> DeleteTagAsync(Guid tagId, Guid userId);

    /// <summary>
    /// 合并标签
    /// </summary>
    Task<int> MergeTagsAsync(Guid userId, Guid[] sourceTagIds, Guid targetTagId);
}

