<?php
defined('_WPBOOKINGPRO_EXEC') or die;
if(!class_exists("WpBookingPro_EmployeeController")) {
    /**
     * Class WpBookingPro_EmployeeController
     */
    class WpBookingPro_EmployeeController extends woobooking_controller
    {
        /**
         * @return mixed
         * @throws Exception
         */
        public function get_employee_by_id()
        {
            return self::view("employee.form");
        }

        /**
         * @return mixed
         * @throws Exception
         */
        public function ajax_get_item()
        {
            return self::view("employee.form");
        }

        /**
         * @return bool
         * @throws Exception
         */
        public function ajax_delete()
        {
            $employeeModel = WoobookingModel::getInstance('employee');
            $input = Factory::getInput();
            $list_delete_employee_id = $input->get('list_delete_employee_id', array(), 'array');
            foreach ($list_delete_employee_id as $employee_id) {
                $employeeModel->delete($employee_id);
            }
            return true;
        }
    }
}
?>