@extends('layouts.previews.intercontinental') @php use App\Enums\ElementType; use App\Enums\TopElementDefault; use App\Enums\CustomElementType; use App\Enums\MultiLangMode; use App\Enums\FvType; use App\Enums\NewsElementDefault; use App\Enums\Boolean; $listImagePc = []; $listImageSp = []; for ($i = 1; $i <= 3; $i++) { if (!empty($project->topPage['slide_image_pc' . $i])) { $listImagePc[] = $project->topPage['slide_image_pc' . $i]; } if (!empty($project->topPage['slide_image_sp' . $i])) { $listImageSp[] = $project->topPage['slide_image_sp' . $i]; } } if (count($listImageSp) == 0) { $listImageSp = $listImagePc; } @endphp @section('content')
@if (fieldPropertyValue('fv_type', $project->topPage) == FvType::MOVIE)
{!! fieldPropertyValue('movie_tag', $project->topPage) !!}
@else
@for ($i = 0; $i < count($listImagePc); $i++)
@endfor
@endif @if (fieldPropertyValue('fv_type_sp', $project->topPage) == FvType::MOVIE)
{!! fieldPropertyValue('movie_tag_sp', $project->topPage) !!}
@else
@for ($i = 0; $i < count($listImageSp); $i++)
@endfor
@endif
@if ($project->show_news && $project->noticePage) @php $noticePage = $project->noticePage->noticeElements ->filter(function ($val) { return $val->element_type == ElementType::DEFAULT && $val->default_element_type == NewsElementDefault::NEW_LIST && $val->status == Boolean::TRUE; }) ->first(); @endphp @if ($noticePage && $notices)
@foreach ($notices[$lang] as $notice) @if (fieldPropertyValue('type', $notice) == Boolean::TRUE && $isShowNotice)
{!! setTextDefault(fieldPropertyValue('title', $notice)) !!} {!! setTextDefault(fieldPropertyValue('title_sp', $notice)) !!}
@endif @endforeach
@endif @endif @foreach ($elements as $item) @if (fieldPropertyValue('element_type', $item) == ElementType::DEFAULT && fieldPropertyValue('default_element_type', $item) == TopElementDefault::INSTAGRAM) @include('preview.intercontinental.defaults.tops.instagram') @endif @if (fieldPropertyValue('status', $item)) @if (fieldPropertyValue('element_type', $item) == ElementType::DEFAULT) @switch(fieldPropertyValue('default_element_type', $item)) @case(TopElementDefault::CONCEPT) @include('preview.intercontinental.defaults.tops.concept') @break @case(TopElementDefault::PLAN) @include('preview.intercontinental.commons.plan') @break @case(TopElementDefault::ROOM) @include('preview.intercontinental.defaults.tops.room') @break @case(TopElementDefault::RESTAURANT) @include('preview.intercontinental.defaults.tops.restaurant') @break @case(TopElementDefault::BANQUET) @include('preview.intercontinental.defaults.tops.banquet') @break @endswitch @endif @if (fieldPropertyValue('element_type', $item) == ElementType::CUSTOM) @if (fieldPropertyValue('custom_element_type', $item) == CustomElementType::CONTACT) @include('preview.intercontinental.customs.contactContent') @endif @if (fieldPropertyValue('custom_element_type', $item) >= CustomElementType::ONE_COLUMN && fieldPropertyValue('custom_element_type', $item) <= CustomElementType::SIDE_CONTENT_V2)
@include('preview.customs.customContent')
@endif @endif @endif @endforeach
@endsection