using Nop.Core;
using Nop.Core.Domain.Blogs;
namespace Nop.Services.Blogs;
///
/// Blog service interface
///
public partial interface IBlogService
{
#region Blog posts
///
/// Deletes a blog post
///
/// Blog post
/// A task that represents the asynchronous operation
Task DeleteBlogPostAsync(BlogPost blogPost);
///
/// Gets a blog post
///
/// Blog post identifier
///
/// A task that represents the asynchronous operation
/// The task result contains the blog post
///
Task GetBlogPostByIdAsync(int blogPostId);
///
/// Gets all blog posts
///
/// The store identifier; pass 0 to load all records
/// Language identifier; 0 if you want to get all records
/// Filter by created date; null if you want to get all records
/// Filter by created date; null if you want to get all records
/// Page index
/// Page size
/// A value indicating whether to show hidden records
/// Filter by blog post title
///
/// A task that represents the asynchronous operation
/// The task result contains the blog posts
///
Task> GetAllBlogPostsAsync(int storeId = 0, int languageId = 0,
DateTime? dateFrom = null, DateTime? dateTo = null,
int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false, string title = null);
///
/// Gets all blog posts
///
/// The store identifier; pass 0 to load all records
/// Language identifier. 0 if you want to get all blog posts
/// Tag
/// Page index
/// Page size
/// A value indicating whether to show hidden records
///
/// A task that represents the asynchronous operation
/// The task result contains the blog posts
///
Task> GetAllBlogPostsByTagAsync(int storeId = 0,
int languageId = 0, string tag = "",
int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);
///
/// Gets all blog post tags
///
/// The store identifier; pass 0 to load all records
/// Language identifier. 0 if you want to get all blog posts
/// A value indicating whether to show hidden records
///
/// A task that represents the asynchronous operation
/// The task result contains the blog post tags
///
Task> GetAllBlogPostTagsAsync(int storeId, int languageId, bool showHidden = false);
///
/// Inserts a blog post
///
/// Blog post
/// A task that represents the asynchronous operation
Task InsertBlogPostAsync(BlogPost blogPost);
///
/// Updates the blog post
///
/// Blog post
/// A task that represents the asynchronous operation
Task UpdateBlogPostAsync(BlogPost blogPost);
///
/// Returns all posts published between the two dates.
///
/// Source
/// Date from
/// Date to
///
/// A task that represents the asynchronous operation
/// The task result contains the filtered posts
///
Task> GetPostsByDateAsync(IList blogPosts, DateTime dateFrom, DateTime dateTo);
///
/// Parse tags
///
/// Blog post
///
/// A task that represents the asynchronous operation
/// The task result contains the ags
///
Task> ParseTagsAsync(BlogPost blogPost);
///
/// Get a value indicating whether a blog post is available now (availability dates)
///
/// Blog post
/// Datetime to check; pass null to use current date
/// Result
bool BlogPostIsAvailable(BlogPost blogPost, DateTime? dateTime = null);
#endregion
#region Blog comments
///
/// Gets all comments
///
/// Customer identifier; 0 to load all records
/// Store identifier; pass 0 to load all records
/// Blog post ID; 0 or null to load all records
/// A value indicating whether to content is approved; null to load all records
/// Item creation from; null to load all records
/// Item creation to; null to load all records
/// Search comment text; null to load all records
///
/// A task that represents the asynchronous operation
/// The task result contains the comments
///
Task> GetAllCommentsAsync(int customerId = 0, int storeId = 0, int? blogPostId = null,
bool? approved = null, DateTime? fromUtc = null, DateTime? toUtc = null, string commentText = null);
///
/// Gets a blog comment
///
/// Blog comment identifier
///
/// A task that represents the asynchronous operation
/// The task result contains the blog comment
///
Task GetBlogCommentByIdAsync(int blogCommentId);
///
/// Get blog comments by identifiers
///
/// Blog comment identifiers
///
/// A task that represents the asynchronous operation
/// The task result contains the blog comments
///
Task> GetBlogCommentsByIdsAsync(int[] commentIds);
///
/// Get the count of blog comments
///
/// Blog post
/// Store identifier; pass 0 to load all records
/// A value indicating whether to count only approved or not approved comments; pass null to get number of all comments
///
/// A task that represents the asynchronous operation
/// The task result contains the number of blog comments
///
Task GetBlogCommentsCountAsync(BlogPost blogPost, int storeId = 0, bool? isApproved = null);
///
/// Deletes a blog comment
///
/// Blog comment
/// A task that represents the asynchronous operation
Task DeleteBlogCommentAsync(BlogComment blogComment);
///
/// Deletes blog comments
///
/// Blog comments
/// A task that represents the asynchronous operation
Task DeleteBlogCommentsAsync(IList blogComments);
///
/// Inserts a blog comment
///
/// Blog comment
/// A task that represents the asynchronous operation
Task InsertBlogCommentAsync(BlogComment blogComment);
///
/// Update a blog comment
///
/// Blog comment
/// A task that represents the asynchronous operation
Task UpdateBlogCommentAsync(BlogComment blogComment);
#endregion
}