<?php
/**
 * Stepper Hooks
 *
 * Registers WordPress AJAX hooks for the stepper controller.
 *
 * @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\Stepper\Stepper_Controller;

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

/**
 * Class Stepper_Hooks
 *
 * Wires WordPress hooks to `Stepper_Controller` static methods.
 */
class Stepper_Hooks {
	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->register_hooks();
	}

	/**
	 * Register hooks.
	 *
	 * @return void
	 */
	private function register_hooks(): void {
		add_action( 'wp_ajax_momcs_sync_update_step', array( Stepper_Controller::class, 'handle_update_step' ) );
	}
}
