@php $nomeLoja = $empresa->nome ?? 'Loja'; $slugNav = $slug ?? 'demo'; $qtdCarrinho = $carrinhoContagem ?? 0; $enderecoLoja = $empresa?->endereco ? trim((string) $empresa->endereco) : ''; $whatsRaw = $empresa?->whatsapp ? trim((string) $empresa->whatsapp) : ''; $whatsDigits = $whatsRaw !== '' ? preg_replace('/\D+/', '', $whatsRaw) : ''; if (is_string($whatsDigits) && ($whatsDigits !== '') && (strlen($whatsDigits) === 10 || strlen($whatsDigits) === 11)) { $whatsDigits = '55'.$whatsDigits; } $temContatoTopo = ($enderecoLoja !== '') || ($whatsDigits !== ''); @endphp
@if ($empresa && $empresa->urlLogo()) @else @endif {{ $nomeLoja }}
@if ($temContatoTopo) @endif @if ($empresa && $empresa->fidelidadePrograma && $empresa->fidelidadePrograma->ativo) Fidelidade @endif Pedido @if ($qtdCarrinho > 0) {{ $qtdCarrinho > 99 ? '99+' : $qtdCarrinho }} @endif
@if ($temContatoTopo)
@if ($enderecoLoja !== '')
{{ $enderecoLoja }}
@endif @if ($whatsDigits !== '') @endif
@endif