<?php
/**
 * Facade for registering OAuth providers with the callback handler.
 *
 * @package WP_PowerSuite\OAuth
 */

namespace WP_PowerSuite\OAuth;

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

final class OAuthManager {

	public static function register( AbstractProvider $provider ): void {
		CallbackHandler::instance()->register( $provider );
	}

	/**
	 * @return array<string, AbstractProvider>
	 */
	public static function getProviders(): array {
		return CallbackHandler::instance()->getProviders();
	}

	public static function getProvider( string $slug ): ?AbstractProvider {
		return CallbackHandler::instance()->getProvider( $slug );
	}
}
