<?php

namespace WpBookingProAdmin\app\views\calendar;

use WpBookingPro\Html\ToolBar;
use WpBookingPro\Mvc\Model\Model;
use WpBookingPro\Mvc\View\View;
use WpBookingPro\Factory as FactoryAlias;
use WpBookingProAdmin\app\helpers\AdminHelper;

class CalendarView extends View
{
    public function display($tpl)
    {
        switch ($tpl) {
            case "list":
                $modelCalendar = Model::getInstance("calendar");
                $this->list = $modelCalendar->getList();
                $this->form = $modelCalendar->getForm();
                $modelEmployees = Model::getInstance('employees');
                $this->list_employee = $modelEmployees->getList();
                $modelServices = Model::getInstance('services');
                $this->list_service = $modelServices->getList();
                $this->permission = AdminHelper::setPermission();
                break;
        }
        return parent::display($tpl);
    }
}