<?php
/**
 * Handles the display and processing of the event creation/modification form
 * for HVAC Trainers. Leverages TEC Community Events functionality where possible.
 *
 * NOTE: This class is currently largely unused as functionality has been moved
 * to using TEC Community Events shortcodes on dedicated pages. Kept for potential future use
 * or if specific hooks are needed later.
 *
 * @package Hvac_Community_Events
 */

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

/**
 * Class HVAC_Event_Handler
 */
class HVAC_Event_Handler {

	/**
	 * Instance of this class.
	 * @var object
	 */
	protected static $instance = null;

	/**
	 * Return an instance of this class.
	 * @return object A single instance of this class.
	 */
	public static function get_instance() {
		// If the single instance hasn't been set, set it now.
		if ( null === self::$instance ) {
			self::$instance = new self();
			self::$instance->init();
		}
		return self::$instance;
	}

	/**
	 * Initialize hooks.
	 */
	public function init() {
		// REMOVED: Hooks for processing form submissions (admin_post_hvac_save_event)
		// add_action( 'admin_post_hvac_save_event', [ $this, 'process_event_submission' ] );
		// add_action( 'admin_post_nopriv_hvac_save_event', [ $this, 'process_event_submission' ] ); // Handle non-logged-in attempts if necessary

		// REMOVED: Shortcode registration for [hvac_event_form]
		// add_shortcode( 'hvac_event_form', [ $this, 'display_event_form_shortcode' ] );
	}

	// REMOVED: display_event_form_shortcode method as we will link to the default TEC CE form page.

	// REMOVED: process_event_submission method as TEC CE shortcode handles its own submission.

	// REMOVED: can_user_edit_event helper method as it's no longer used.

}

// Instantiate the class
HVAC_Event_Handler::get_instance();