<?php

namespace Hura8\Components\Marketing\AdminController;

use Hura8\Components\Marketing\Controller\bProductFeedController;
use Hura8\Components\Marketing\Model\ProductFeedModel;
use Hura8\Interfaces\iEntityAdminController;
use Hura8\System\Controller\aAdminEntityBaseController;
use Hura8\Traits\AdminEntityBaseControllerTraits;


class AProductFeedController extends bProductFeedController implements iEntityAdminController
{

    use AdminEntityBaseControllerTraits;

    public function getAllCategories() {
        return $this->objProductFeedModel->getAllCategories();
    }

    public function getAllProductListIds( $list_id){
        return $this->objProductFeedModel->getAllProductListIds($list_id);
    }

    public function getProductListTotal($list_id) {
        return $this->objProductFeedModel->getProductListTotal($list_id);
    }

    public function getProductList($list_id, $page = 1, $numPerPage = 30) {
        return $this->objProductFeedModel->getProductList($list_id, $page, $numPerPage);
    }

    public function deleteAllProductFromList($list_id) {
        $this->objProductFeedModel->deleteAllProductFromList($list_id);
    }

    //remove product from a list
    public function deleteProductFromList($pro_list, $list_id){
        return $this->objProductFeedModel->deleteProductFromList($pro_list, $list_id);
    }

    //add product to a list
    public function addProductToList($pro_list, $list_id){
        return $this->objProductFeedModel->addProductToList($pro_list, $list_id);
    }

    protected function deleteFileBeforeDeleteItem($item_id): bool
    {
        return true;
    }
}
