@extends('layouts.previews.ibisStyles')
@php
use App\Enums\ElementType;
use App\Enums\TopElementDefault;
use App\Enums\CustomElementType;
use App\Enums\NoteType;
use App\Enums\FvType;
$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::IMAGE)
@foreach ($listImagePc as $index => $image)
@endforeach
@if (fieldPropertyValue('note_type', $project->topPage) == NoteType::THERE_IS_TEXT)
@foreach ($listImagePc as $index => $image)
{!! textNoteIbisStyle(textLocale('note', $project->topPage, $lang)) !!}
@endforeach
@endif
@else
{!! fieldPropertyValue('movie_tag', $project->topPage) !!}
@if (fieldPropertyValue('note_type', $project->topPage) == NoteType::THERE_IS_TEXT)
{!! textNoteIbisStyle(textLocale('note', $project->topPage, $lang)) !!}
@endif
@endif
@if (fieldPropertyValue('fv_type_sp', $project->topPage) == FvType::IMAGE)
@foreach ($listImageSp as $index => $image)
@endforeach
@if (fieldPropertyValue('note_type_sp', $project->topPage) == NoteType::THERE_IS_TEXT)
@foreach ($listImageSp as $index => $image)
{!! textNoteIbisStyle(textLocale('note_sp', $project->topPage, $lang)) !!}
@endforeach
@endif
@else
{!! fieldPropertyValue('movie_tag_sp', $project->topPage) !!}
@endif
@if (showSearchRoom(fieldPropertyValue('reservation_engine', $basic)))
@endif
@if (showSearchPeople(fieldPropertyValue('reservation_engine', $basic)))
@endif
@php
$viewIG = false;
@endphp
@foreach ($elements as $index => $item)
@if ($index == 2)
@include('preview.ibisStyles.defaults.tops.allContaint')
@endif
@if (fieldPropertyValue('status', $item))
@if (fieldPropertyValue('element_type', $item) == ElementType::DEFAULT)
@switch(fieldPropertyValue('default_element_type', $item))
@case(TopElementDefault::PICKUP)
@include('preview.ibisStyles.defaults.tops.pickup')
@break
@case(TopElementDefault::CONCEPT)
@include('preview.ibisStyles.defaults.tops.concept')
@break
{{-- @case(TopElementDefault::CHILD_PAGE_TRANSITION)
@include('preview.ibisStyles.defaults.tops.childPageTransition')
@break --}}
{{-- @case(TopElementDefault::ROOM)
@include('preview.ibisStyles.defaults.tops.room')
@break --}}
@case(TopElementDefault::PLAN)
@include('preview.ibisStyles.commons.plan')
@break
@case(TopElementDefault::FOUR_SEASONS)
@include('preview.ibisStyles.defaults.tops.fourSeason')
@break
@case(TopElementDefault::INSTAGRAM)
@include('preview.ibisStyles.defaults.tops.instagram')
@break
{{-- @case(TopElementDefault::RESTAURANT)
@include('preview.ibisStyles.defaults.tops.restaurant')
@break --}}
{{-- @case(TopElementDefault::OTHER_FACILITY)
@include('preview.ibisStyles.defaults.tops.facility')
@break --}}
@case(TopElementDefault::CV_NEXT)
@php
$reserve = $item;
@endphp
@break
@endswitch
@endif
@endif
@if (textLocale('status', $item, $lang) &&
fieldPropertyValue('custom_element_type', $item) >= CustomElementType::ONE_COLUMN &&
fieldPropertyValue('custom_element_type', $item) <= CustomElementType::SIDE_CONTENT_V2)
@include('preview.customs.customContent')
@endif
@endforeach
@if ($project->show_news && $project->noticePage)
@include('preview.ibisStyles.defaults.tops.newsContent')
@endif
@if (count($elements) <= 2)
@include('preview.ibisStyles.defaults.tops.allContaint')
@endif
@if (!empty($reserve))
@include('preview.ibisStyles.commons.reserve')
@endif
@endsection