<?php // phpcs:ignore
/**
 * Wemeet_API Class
 *
 * This class manages the Wemeet_API functionality for the Meeting Hub plugin.
 *
 * @package SOVLIX\WEMEET
 */

namespace SOVLIX\WEMEET;

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

if ( ! class_exists( 'Wemeet_API' ) ) {
	/**
	 * Wemeet_API Class
	 *
	 * Handles Wemeet_API-related tasks and functionality for the Meeting Hub plugin.
	 *
	 * @since 1.0.0
	 */
	class Wemeet_API {
		/**
		 * Wemeet_API constructor.
		 *
		 * Initializes the Wemeet_API class.
		 */
		public function __construct() {
			add_action( 'rest_api_init', array( $this, 'register_api' ) );
		}

		/**
		 * Register the Wemeet_API
		 *
		 * Performs tasks related to registering the Wemeet_API for the Meeting Hub plugin.
		 *
		 * @return void
		 *
		 * @since 1.0.0
		 */
		public function register_api() {
			$meetings = new API\Wemeet_Meetings();
			$meetings->register_routes();
			$settings = new API\Wemeet_Settings();
			$settings->register_routes();
			$webex = new API\Wemeet_Webex();
			$webex->register_routes();
		}
	}
}
