<?php
/**
 * Listing Status Hooks Registrar
 *
 * Registers Action Scheduler and AJAX hooks for listing status operations.
 *
 * @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\Listing_Status_Controller;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Class Listing_Status_Hooks
 */
class Listing_Status_Hooks {

	/**
	 * Constructor. Registers hooks.
	 */
	public function __construct() {
		// Action Scheduler hook for polling listing status.
		add_action( Listing_Status_Controller::ACTION, array( Listing_Status_Controller::class, 'check_status' ), 10, 4 );
		// AJAX endpoints.
		add_action( 'wp_ajax_momcs_amz_get_listing_issues', array( Listing_Status_Controller::class, 'get_issues' ) );
		add_action( 'wp_ajax_momcs_amz_refresh_product_status', array( Listing_Status_Controller::class, 'refresh_status' ) );
	}
}
