@props(['location' => 'unknown', 'attributes' => []]) @php $captchaService = app(\App\Services\Captcha\CaptchaService::class); // Check if CAPTCHA is enabled for this location if (!$captchaService->isEnabled($location)) { return; } // Check if IP is whitelisted if ($captchaService->isWhitelisted()) { return; } $provider = $captchaService->getProviderName(); $scriptUrl = $captchaService->getScriptUrl(); $siteKey = $captchaService->getSiteKey(); @endphp @if($provider && $scriptUrl) {{-- Load CAPTCHA script --}} @once @if($provider === 'recaptcha_v3') @else @endif @endonce {{-- Render CAPTCHA widget --}}