@if($profileImageUrl)

@else
 }}&background=1E293B&color=fff&size=112&rounded=true)
@endif
{{ $cardData['title'] }}
@if(isset($planFeatures['basic_info']) && $planFeatures['basic_info'] && $cardData['specialization'])
{{ $cardData['specialization'] }}
@endif
@if(isset($planFeatures['basic_info']) && $planFeatures['basic_info'] && $cardData['company_name'])
{{ $cardData['company_name'] }}
@endif
@if(isset($planFeatures['leads']) && $planFeatures['leads'] && $leadFormData['is_enabled'])
{{ $leadFormData['button_text'] }}
@endif
@if(isset($planFeatures['contact_info']) && $planFeatures['contact_info'] && !empty($cardData['title']))
@endif
@foreach($links as $link)
@if($link['type'] === 'info_card')
{{ isset($link['data']['description']) ? $link['data']['description'] : $link['label'] }}
@if(isset($link['data']['value']) && !empty($link['data']['value']))
{{ $link['data']['value'] }}
@endif
@if(!empty($link['image_path']))
@endif
@else
@php
$linkTypes = [
'https://wa.me/',
'https://linkedin.com/in/',
'https://instagram.com/',
'https://youtube.com/',
'https://tiktok.com/',
'https://facebook.com/',
'https://threads.net/@',
'https://x.com/',
'mailto:',
];
$isBaseUrl = in_array($link['url'], $linkTypes) || $link['url'] === '#';
@endphp
{{ $link['label'] }}
@if($isBaseUrl)
(Configure)
@endif
@endif
@endforeach
@php
// Determinar qual logo usar baseado na cor de fundo
$logoToUse = 'juscontact_branco.png'; // Padrão: branco
if ($backgroundColor) {
$hexColor = str_replace('#', '', $backgroundColor->hex_code);
// Converter hex para RGB
$r = hexdec(substr($hexColor, 0, 2));
$g = hexdec(substr($hexColor, 2, 2));
$b = hexdec(substr($hexColor, 4, 2));
// Calcular luminância (0 = preto, 255 = branco)
$luminance = (0.299 * $r + 0.587 * $g + 0.114 * $b);
// Se a cor for muito clara (> 180), usar logo colorida
if ($luminance > 180) {
$logoToUse = 'juscontact_preto.png';
}
}
@endphp