@php $variant = $variant ?? 'sidebar'; $contactValue = trim(html_decode($value ?? '')); $contactType = $type ?? 'tel'; $liClass = $liClass ?? ''; $contextType = $contextType ?? 'agent'; $contextId = $contextId ?? null; $contactKind = $contactKind ?? match ($contactType) { 'email' => 'email', 'whatsapp' => 'whatsapp', default => 'phone', }; $masked = mb_strlen($contactValue) > 3 ? mb_substr($contactValue, 0, 3) . '•••' : $contactValue; $guestMustLogin = contact_reveal_guest_must_login(); $revealLabel = match ($contactType) { 'email' => __('translate.Show email'), 'whatsapp' => __('translate.Contact WhatsApp'), default => __('translate.Show number'), }; $loginLabel = match ($contactType) { 'email' => __('translate.Login to view email'), 'whatsapp' => __('translate.Contact WhatsApp'), default => __('translate.Call seller'), }; $wrapperClass = match ($variant) { 'banner' => 'protected-contact protected-contact--banner', 'profile' => 'protected-contact protected-contact--profile', default => 'motorcycle-side-ber-contuct-link protected-contact protected-contact--sidebar'.($guestMustLogin ? ' protected-contact--guest-login' : ''), }; $securityEnabled = contact_reveal_protection_enabled() && ! $guestMustLogin; @endphp @if($contactValue !== '' && $contextId)