using HoneyBox.Admin.Models.Menu;

namespace HoneyBox.Admin.Services;

/// <summary>
/// 菜单服务接口
/// </summary>
public interface IMenuService
{
    /// <summary>
    /// 获取菜单树形结构
    /// </summary>
    /// <returns>菜单树列表</returns>
    Task<List<MenuTreeDto>> GetMenuTreeAsync();

    /// <summary>
    /// 根据ID获取菜单详情
    /// </summary>
    /// <param name="id">菜单ID</param>
    /// <returns>菜单详情</returns>
    Task<MenuDto> GetByIdAsync(long id);

    /// <summary>
    /// 创建菜单
    /// </summary>
    /// <param name="request">创建请求</param>
    /// <returns>新菜单ID</returns>
    Task<long> CreateAsync(CreateMenuRequest request);

    /// <summary>
    /// 更新菜单
    /// </summary>
    /// <param name="id">菜单ID</param>
    /// <param name="request">更新请求</param>
    Task UpdateAsync(long id, UpdateMenuRequest request);

    /// <summary>
    /// 删除菜单
    /// </summary>
    /// <param name="id">菜单ID</param>
    Task DeleteAsync(long id);

    /// <summary>
    /// 获取用户菜单（合并部门菜单、角色菜单、用户专属菜单）
    /// </summary>
    /// <param name="adminUserId">管理员ID</param>
    /// <returns>用户菜单树列表</returns>
    Task<List<MenuTreeDto>> GetUserMenusAsync(long adminUserId);
}
