namespace BackOffice.Services.Blog;

public interface IBlogPostImageService
{
    Task<List<BlogPostImageItemDto>> GetByPostIdAsync(long blogPostId);
    Task<long> AddAsync(BlogPostImageAddDto dto);
    Task DeleteAsync(long id);
    Task ReorderAsync(List<ImageSortItemDto> items);
}

public class BlogPostImageItemDto
{
    public long Id { get; set; }
    public long BlogPostId { get; set; }
    public string ImagePath { get; set; } = string.Empty;
    public string ThumbnailPath { get; set; } = string.Empty;
    public string? AltText { get; set; }
    public string? Caption { get; set; }
    public int SortOrder { get; set; }
}

public class BlogPostImageAddDto
{
    public long BlogPostId { get; set; }
    public string ImagePath { get; set; } = string.Empty;
    public string ThumbnailPath { get; set; } = string.Empty;
    public string? AltText { get; set; }
    public string? Caption { get; set; }
    public int SortOrder { get; set; }
}

public class ImageSortItemDto
{
    public long Id { get; set; }
    public int SortOrder { get; set; }
}
