using HoneyBox.Admin.Business.Models.Danye;

namespace HoneyBox.Admin.Business.Services.Interfaces;

/// <summary>
/// 单页管理服务接口
/// </summary>
public interface IDanyeService
{
    /// <summary>
    /// 获取单页列表
    /// </summary>
    /// <returns>单页列表</returns>
    Task<List<DanyeResponse>> GetDanyeListAsync();

    /// <summary>
    /// 获取单页详情
    /// </summary>
    /// <param name="id">单页ID</param>
    /// <returns>单页详情</returns>
    Task<DanyeDetailResponse?> GetDanyeByIdAsync(int id);

    /// <summary>
    /// 更新单页内容
    /// </summary>
    /// <param name="id">单页ID</param>
    /// <param name="request">更新请求</param>
    /// <returns>是否成功</returns>
    Task<bool> UpdateDanyeAsync(int id, DanyeUpdateRequest request);

    /// <summary>
    /// 切换图片优化状态
    /// </summary>
    /// <param name="id">单页ID</param>
    /// <param name="request">图片优化请求</param>
    /// <returns>是否成功</returns>
    Task<bool> ToggleImageOptimizerAsync(int id, ImageOptimizerRequest request);

    /// <summary>
    /// 清空单页内容
    /// </summary>
    /// <param name="id">单页ID</param>
    /// <returns>是否成功</returns>
    Task<bool> ClearContentAsync(int id);

    /// <summary>
    /// 删除单页
    /// </summary>
    /// <param name="id">单页ID</param>
    /// <returns>是否成功</returns>
    Task<bool> DeleteDanyeAsync(int id);
}
