package com.codenetworkz.blog.services;


import com.codenetworkz.blog.dtos.CategoryDto;
import com.codenetworkz.blog.dtos.TagDto;
import com.codenetworkz.blog.exceptions.InternalServerException;
import com.codenetworkz.blog.exceptions.ResourceNotAvailable;
import com.codenetworkz.blog.models.Category;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Optional;

public interface CategoryService {

    Optional<CategoryDto> save(String categoryName, String description) throws InternalServerException, ResourceNotAvailable;
    Optional<CategoryDto> update(String categorySlug, String categoryName, String description) throws InternalServerException, ResourceNotAvailable;
    Optional<Category> findByCategorySlug(String categorySlug) throws InternalServerException, ResourceNotAvailable;
    List<CategoryDto> findAll()  throws InternalServerException;;
    public Optional<CategoryDto> changeActivateStatus(String categorySlug) throws InternalServerException;
    String delete(String  categorySlug) throws InternalServerException, ResourceNotAvailable;
    public Optional<CategoryDto> changeApprovalStatus(String categorySlug) throws InternalServerException;
    List<CategoryDto> findByCategoryIds(List<Long> categoryIds) throws InternalServerException;

    public Page<CategoryDto> getCategoryWithPagination(int page, int size) throws InternalServerException;
}
