<?php

namespace Hura8\Components\Template\AdminController;

use Hura8\Components\Template\Controller\TemplateController;
use Hura8\Components\Template\Model\TemplateSetModel;
use Hura8\Interfaces\AppResponse;
use Hura8\System\Controller\SettingController;

class ATemplateSetController
{

    /* @var TemplateSetModel $objTemplateSetModel */
    protected  $objTemplateSetModel;


    public function __construct() {
        $this->objTemplateSetModel = new TemplateSetModel();
    }


    // get empty/default item for form
    public function getEmptyInfo($addition_field_value = []) {
        return $this->objTemplateSetModel->getEmptyInfo($addition_field_value);
    }

    public function checkSetExist($set_name)
    {
        return $this->objTemplateSetModel->getInfoBySet($set_name);
    }

    public function getActivatedSet() {
        return $this->objTemplateSetModel->getActivatedSet();
    }

    public function getList(array $condition)
    {
        return $this->objTemplateSetModel->getList($condition);
    }

    public function getInfo($id): ?array
    {
        return $this->objTemplateSetModel->getInfo($id);
    }

}
