@props([ 'service', 'heroCards' => [], ]) @php $section = $service['ownerObjections'] ?? null; $items = is_array($section['items'] ?? null) ? array_values($section['items']) : []; $slug = (string) ($service['slug'] ?? ''); $sectionImages = $slug === 'website-development' ? [ [ 'image' => 'images/portfolio/promoto-service/ui-design.webp', 'title' => 'Website UI design by Criazo', ], [ 'image' => 'images/portfolio/renting-algarve/mobile-first-design-developed-by-criazo-for-renting-algarve.webp', 'title' => 'Mobile website design by Criazo', ], [ 'image' => 'images/portfolio/zaplead/marketing-website-design-developed-by-criazo-for-zaplead.webp', 'title' => 'Marketing website design by Criazo', ], [ 'image' => 'images/portfolio/demace/customization-workflows-developed-by-criazo-for-demace.webp', 'title' => 'Website product workflow by Criazo', ], ] : []; $cards = count($sectionImages) > 0 ? $sectionImages : array_values($heroCards ?? []); @endphp @if($section && count($items) > 0)
@foreach($items as $i => $item) @php $image = $cards[$i % max(count($cards), 1)]['image'] ?? null; $imageAlt = $cards[$i % max(count($cards), 1)]['title'] ?? ($item['title'] ?? ''); @endphp

{{ $item['title'] ?? '' }}

{{ $item['text'] ?? '' }}

@if($image) {{ $imageAlt }} @else
@endif
@endforeach
@endif