<?php
/**
 * Shared admin UI snippets for OAuth sign-in modules.
 *
 * @package WP_PowerSuite\OAuth\Admin
 */

namespace WP_PowerSuite\OAuth\Admin;

use WP_PowerSuite\OAuth\Helpers\OAuthSettingsHelper;

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

final class SettingsUiHelper {

	public static function renderHttpsNotice(): void {
		if ( OAuthSettingsHelper::siteUsesHttps() ) {
			return;
		}
		?>
		<div class="wp-powersuite-info-box" style="background: #fcf0f1; border-left: 4px solid #d63638; padding: 12px; margin: 0 0 20px 0;">
			<p style="margin: 0;">
				<strong><?php esc_html_e( 'HTTPS recommended', 'wp-powersuite' ); ?></strong>
				<?php esc_html_e( 'OAuth providers require a secure callback URL. Enable HTTPS on this site and register the https:// callback URL in your provider console.', 'wp-powersuite' ); ?>
			</p>
		</div>
		<?php
	}
}
