@extends('layouts.previews.hankyu') @php use App\Enums\ElementType; use App\Enums\AccessElementDefault; use App\Enums\CustomElementType; $banner = current( array_filter($elements, function ($value) { return $value['element_type'] == ElementType::DEFAULT && $value['default_element_type'] == AccessElementDefault::BANNER; }), ); @endphp @section('content')
@foreach ($elements as $index => $item) @if (fieldPropertyValue('status', $item)) @if (fieldPropertyValue('element_type', $item) == ElementType::DEFAULT) @switch(fieldPropertyValue('default_element_type', $item)) @case(AccessElementDefault::CONCEPT) @include('preview.hankyu.defaults.access.concept') @break @case(AccessElementDefault::TRAIN_OR_BUS) @include('preview.hankyu.defaults.access.trainOrBus') @break @case(AccessElementDefault::AIRPLANE) @include('preview.hankyu.defaults.access.airplane') @break @case(AccessElementDefault::CAR) @include('preview.hankyu.defaults.access.car') @break @case(AccessElementDefault::PARKING_INFORMATION) @include('preview.hankyu.defaults.access.parkingInformation') @break @case(AccessElementDefault::PLAN) @include('preview.hankyu.commons.plan') @break @case(AccessElementDefault::CV_NEXT) @php $reserve = $item; @endphp @break @endswitch @endif @if (fieldPropertyValue('element_type', $item) == ElementType::CUSTOM && fieldPropertyValue('custom_element_type', $item) == CustomElementType::CONTACT) @include('preview.hankyu.customs.contactContent') @endif @endif @if (fieldPropertyValue('element_type', $item) == ElementType::CUSTOM && (textLocale('status', $item, $lang))) @if (fieldPropertyValue('custom_element_type', $item) >= CustomElementType::ONE_COLUMN && fieldPropertyValue('custom_element_type', $item) <= CustomElementType::SIDE_CONTENT_V2) @include('preview.customs.customContent') @endif @endif @if (fieldPropertyValue('element_type', $item) == ElementType::DEFAULT && fieldPropertyValue('default_element_type', $item) == AccessElementDefault::CONCEPT) @include('preview.hankyu.defaults.access.map') @endif @endforeach @include('preview.hankyu.commons.allContaint') @if (!empty($reserve)) @include('preview.hankyu.commons.reserve') @endif
@endsection