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

        /**
         * @param string $data_post
         * @return array|bool|mixed|stdClass
         */
        public function ajax_save($data_post = "")
        {
            $input = Factory::getInput();
            if (!$data_post) {
                $data_post = $input->getData()['data'];
            }
            $data_post['id'] = 1;
            $data_post = parent::save($data_post); // TODO: Change the autogenerated stub
            $response = new stdClass();
            $response->data = $data_post;
            return $response;
        }
    }
}

?>