@props([ 'service', 'slug', 'heroCards' => [], 'contactHref', 'isLocationPage' => false, 'locationDisplayName' => null, 'locationData' => null, 'theme' => 'light', ]) @php use Illuminate\Support\Str; $isDark = $theme === 'dark'; $sliderId = 'service-hero-cards-' . preg_replace('/[^a-z0-9-]/', '', (string) $slug); $cards = array_values($heroCards); $heroTitle = $isLocationPage && $locationDisplayName ? rtrim($service['heroTitle'] ?? $service['name'], '. ') . ' ' . __('messages.service_location.in') . ' ' . $locationDisplayName : ($service['heroTitle'] ?? $service['name']); $heroLead = $service['heroSubtitle'] ?? (! empty($service['heroDescription']) ? Str::limit($service['heroDescription'], 160) : ''); @endphp
! $isDark, 'dn-page-hero dn-page-hero--dark dn-page-hero--service' => $isDark, ]) @if($isDark && ! empty($service['listingImage'])) data-dn-hero-theme="dark" style="--dn-hero-image: url('{{ asset($service['listingImage']) }}')" @endif aria-labelledby="service-hero-heading" > @if($isDark) @endif
$isDark])>

! $isDark, 'svc-hero-title--dark' => $isDark, ]) itemprop="name">{{ $heroTitle }}

@if($heroLead)

! $isDark, 'hero-subcopy svc-hero-subcopy--dark' => $isDark, ]) itemprop="description">{{ $heroLead }}

@endif
@if(count($cards) > 0)
@foreach($cards as $index => $card)
{{ $card['title'] }}

{{ $card['title'] }}

@if(! empty($card['subtitle']))

{{ $card['subtitle'] }}

@endif
@endforeach
@endif
@once @push('styles') @endpush @endonce @if(count($cards) > 0) @push('scripts') @endpush @endif