namespace TaxBaik.Domain.Interfaces;

using TaxBaik.Domain.Entities;

public interface IBlogPostRepository
{
    Task<BlogPost?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
    Task<BlogPost?> GetBySlugAsync(string slug, CancellationToken cancellationToken = default);
    Task<(IEnumerable<BlogPost> Items, int Total)> GetPublishedPagedAsync(
        int page, int pageSize, int? categoryId = null, CancellationToken cancellationToken = default);
    Task<IEnumerable<BlogPost>> GetByCategorySlugAsync(string categorySlug, int limit, CancellationToken cancellationToken = default);
    Task<IEnumerable<BlogPost>> GetAllForAdminAsync(CancellationToken cancellationToken = default);
    Task<(IEnumerable<BlogPost> Items, int Total)> GetAdminPagedAsync(
        int page, int pageSize, CancellationToken cancellationToken = default);
    Task<(IEnumerable<BlogPost> Items, int Total)> GetArchivedPagedAsync(
        int page, int pageSize, CancellationToken cancellationToken = default);
    Task<int> CreateAsync(BlogPost post, CancellationToken cancellationToken = default);
    Task UpdateAsync(BlogPost post, CancellationToken cancellationToken = default);
    Task DeleteAsync(int id, CancellationToken cancellationToken = default);
    Task ArchiveAsync(int id, CancellationToken cancellationToken = default);
    Task RestoreAsync(int id, CancellationToken cancellationToken = default);
    Task IncrementViewCountAsync(int id, CancellationToken cancellationToken = default);
}
