@php global $chirkashi; @endphp @php $firstHero = isset($dynamicPageModel) ? data_get($dynamicPageModel, 'content.list_hero.0', []) : []; $mediaList = data_get($firstHero, 'list_media_list', []); $hero = collect($mediaList)->map(function ($media, $index) use ($firstHero) { return [ 'title' => isset($firstHero['string_hero_title']) ? clean($firstHero['string_hero_title']) : null, 'subtitle' => $firstHero['string_hero_subtitle'] ?? null, 'text' => isset($firstHero['wysiwyg_hero_description']) ? clean($firstHero['wysiwyg_hero_description']) : null, 'button' => [ 'url' => data_get($firstHero, 'list_hero_cta.0.string_hero_cta_url'), 'title' => data_get($firstHero, 'list_hero_cta.0.string_hero_cta_label'), ], 'video_file' => !empty($media['string_local_video']) ? asset($media['string_local_video']) : null, 'image' => !empty($media['image_picture']) ? asset($media['image_picture']) : null, 'image_borders' => [ 'desktop' => ['left' => true, 'right' => true, 'top' => true, 'bottom' => true], 'mobile' => ['left' => false, 'right' => false, 'top' => false, 'bottom' => true], ], ]; })->all(); @endphp @if (!empty($hero) and is_array($hero))