@php use App\Services\CaptchaService; $provider = CaptchaService::getProvider(); $enabled = CaptchaService::isEnabled($context ?? 'login'); $siteKey = CaptchaService::getSiteKey(); $wireModel = $wireModel ?? 'captchaToken'; // Unique ID per instance so multiple widgets on one page work $widgetId = 'captcha-widget-' . uniqid(); @endphp @if ($enabled && $provider !== 'none' && $siteKey !== '') @if ($provider === 'recaptcha_v2') {{-- ---- reCAPTCHA v2 (explicit checkbox widget) ---- --}}
@elseif ($provider === 'recaptcha_v3') {{-- ---- reCAPTCHA v3 (invisible — token fetched on submit) ---- --}} {{-- reCAPTCHA v3 has no visible widget. We inject a hidden input and execute the challenge when the form's submit button is clicked. The Livewire action must be triggered via a separate event after the token is obtained, so we intercept the button click. --}}

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

@elseif ($provider === 'hcaptcha') {{-- ---- hCaptcha (explicit checkbox widget) ---- --}}
@elseif ($provider === 'turnstile') {{-- ---- Cloudflare Turnstile (smart / usually invisible) ---- --}}
@endif {{-- Validation error display --}} @error($wireModel)

{{ $message }}

@enderror @endif