<?php
/**
 * Field Mapping Hooks – wires AJAX actions to controller static endpoints.
 *
 * @package    MOMCS_Sync
 * @subpackage MOMCS_Sync\includes\common\hooks
 * @author     miniOrange
 */

declare(strict_types=1);

namespace MOMCS_Sync\Includes\Common\Hooks;

use MOMCS_Sync\Includes\Common\Controllers\Template_Mapping\Field_Mapping_Controller;

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

/**
 * Field Mapping Hooks.
 */
class Field_Mapping_Hooks {
	/**
	 * Constructor.
	 */
	public function __construct() {
		$this->register_hooks();
	}

	/**
	 * Register AJAX hooks for field mapping feature.
	 */
	private function register_hooks(): void {
		add_action( 'wp_ajax_momcs_sync_save_field_mapping', array( Field_Mapping_Controller::class, 'handle_save_field_mapping' ) );
		add_action( 'wp_ajax_momcs_sync_get_field_mapping', array( Field_Mapping_Controller::class, 'handle_get_field_mapping' ) );
	}
}
