<?php
namespace App\Services;

use App\Repositories\ProductCategoryRepository;

class ProductCategoryService
{
    private $productCategoryRepository;

    public function __construct(ProductCategoryRepository $productCategoryRepository) {
        $this->productCategoryRepository = $productCategoryRepository;
    }

    public function all()
    {
        return $this->productCategoryRepository->all();
    }

    public function paginate($perPage)
    {
        return $this->productCategoryRepository->paginate($perPage);
    }

    public function filter($searchTerm, $perPage)
    {
        return $this->productCategoryRepository->filter($searchTerm, $perPage);
    }

    public function store(array $data)
    {
        return $this->productCategoryRepository->store($data);
    }

    public function find($id)
    {
        return $this->productCategoryRepository->find($id);
    }

    public function findBySlug($slug)
    {
        return $this->productCategoryRepository->findBySlug($slug);
    }

    public function update(array $data, $id)
    {
        return $this->productCategoryRepository->update($data, $id);
    }

    public function delete(array $validateData)
    {
        return $this->productCategoryRepository->delete($validateData);
    }

    public function categoriesWithProducts()
    {
        return $this->productCategoryRepository->categoriesWithProducts();
    }
}
