<?php
/**
 * Sync Audits Hooks – wires AJAX actions to Sync Audits controller endpoints.
 *
 * @package    MOMCS_Sync
 * @subpackage MOMCS_Sync/includes/common/hooks
 */

declare(strict_types=1);

namespace MOMCS_Sync\Includes\Common\Hooks;

use MOMCS_Sync\Includes\Common\Controllers\Sync_Queue_Controller;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class Sync_Queue_Hooks
 */
class Sync_Queue_Hooks {
	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->register_hooks();
	}

	/**
	 * Register AJAX hooks for sync audits feature.
	 */
	private function register_hooks(): void {
		add_action( 'wp_ajax_momcs_get_sync_queue', array( Sync_Queue_Controller::class, 'handle_get_sync_queue' ) );
		add_action( 'wp_ajax_momcs_get_job_logs', array( Sync_Queue_Controller::class, 'handle_get_job_logs' ) );
		add_action( 'wp_ajax_momcs_get_scheduled_sync_queue', array( Sync_Queue_Controller::class, 'handle_get_scheduled_sync_queue' ) );
		add_action( 'wp_ajax_momcs_get_order_sync_queue', array( Sync_Queue_Controller::class, 'handle_get_order_sync_queue' ) );
	}
}
