@if (captcha_enabled()) @php $captchaContext = $captchaContext ?? $captchaPrefix ?? 'default'; $captchaPrefix = $captchaPrefix ?? $captchaContext; $captchaImageId = $captchaImageId ?? ($captchaPrefix ? $captchaPrefix.'-captcha-image' : 'custom-captcha-image'); $captchaInputId = $captchaInputId ?? ($captchaPrefix ? $captchaPrefix.'-captcha-input' : 'custom-captcha-input'); $captchaImageUrl = captcha_image_url($captchaContext); $deferCaptchaImage = (bool) ($captchaDeferLoad ?? false); $turnstileConfig = turnstile_widget_config(); $turnstileVariant = $captchaTurnstileVariant ?? 'default'; $deferTurnstileRender = (bool) ($captchaDeferTurnstile ?? false); // kept for modal includes @endphp @if (captcha_is_google())
@elseif (captcha_is_turnstile()) @php $turnstileIsDark = $turnstileVariant === 'dark'; $turnstileDisplayMode = $turnstileConfig['display_mode'] ?? 'always'; $turnstileIsInvisible = $turnstileDisplayMode === 'invisible'; $turnstileIsInteractionOnly = $turnstileDisplayMode === 'interaction_only'; $turnstileMinimizeUntilChallenge = $turnstileIsInvisible || $turnstileIsInteractionOnly; $turnstileSize = $turnstileIsDark ? 'normal' : $turnstileConfig['size']; $turnstileTheme = $turnstileIsDark ? 'dark' : $turnstileConfig['theme']; $turnstileHideLabel = $turnstileIsDark || $turnstileMinimizeUntilChallenge; @endphp