<?php
/**
 * WordPress AJAX Routes
 *
 * @package ZenoChatbot
 */

use ZenoChatbot\Framework\Http\Ajax;
use ZenoChatbot\Framework\Http\Response;

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

/*
|--------------------------------------------------------------------------
| AJAX Routes
|--------------------------------------------------------------------------
|
| Here is where you can register AJAX routes for your plugin. These
| routes are loaded by the CoreServiceProvider and use the Ajax
| routing system with proper dependency injection.
|
*/

// Chat AJAX Routes - Public (accessible to both authenticated and public users)
Ajax::register('zenochatbot_chat', 'ZenoChatbot\Controller\AjaxChatController@handleChatRequest')->public();
Ajax::register('zenochatbot_history', 'ZenoChatbot\Controller\AjaxChatController@getChatHistory')->public();
Ajax::register('zeno_chatbot_session_end', 'ZenoChatbot\Controller\AjaxChatController@endChatSession')->public();
