@extends('views.layouts.master')
<link rel="stylesheet" href="{{ csset('/themes/pro/modunawa/resources/css/blog-standard.css') }}">
@section('content')

@php
    $post = $listType1Book['Book'][0]['Page'][0];
    $prePost = $listType1Book['Book'][1]['Page'];
    $nextPost = $listType1Book['Book'][2]['Page'];
@endphp

<!--=====================================
BANNER PART START
=======================================-->

<section class="inner-section single-banner">
	<div class="container">
		<h2>이벤트</h2>
		<ol class="breadcrumb">
			<li class="breadcrumb-item"><a href="/">Home</a></li>
			<li class="breadcrumb-item active" aria-current="page"><a href="{{ route('my-page.event.list') }}">이벤트</a></li>
		</ol>
	</div>
</section>
<!--=====================================
BANNER PART END
=======================================-->

<!--=====================================
BLOG GRID PART START
=======================================-->
<section class="inner-section blog-details-part">
	<div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-12 col-xl-10">
                <article class="blog-details">
                    <div class="blog-details-content">
						<div class="blog-details-top">
                            <div class="d-flex justify-content-between align-items-center">
                                <div>
                                    <h2 class="blog-details-title">{{ $post['C5'] }}</h2>
                                    <ul class="blog-details-meta">
                                        <li>
                                            <i class="icofont-ui-calendar"></i>
                                            @if (empty($post['C10']))
                                                <span>상시 이벤트</span>
                                            @else
                                                <span>{{ $post['C10'] }} ~ {{ $post['C11'] }}</span>
                                            @endif
                                        </li>
                                        <li>
                                            <i class="icofont-user-alt-3"></i>
                                            <span>{{ $post['C13'] }}</span>
                                        </li>
                                        <li>
                                            <i class="icofont-star"></i>
                                            <span>{{ DataConverter::execute($post['C9'], "status('post-event')") }}</span>
                                        </li>
                                    </ul>
                                </div>
                                <div class="filter-btn mb-0 blog-standard">
                                    <button type="button" class="btn btn_prime" onclick="location.href='{{ route('my-page.event.list') }}'">이벤트 리스트</button>
                                </div>
                            </div>
						</div>

						<!-- 내용 시작 -->
						<div class="blog-details-cont">
                            {!! $post['C6'] !!}
                        </div>
						<!--// 내용 끝 -->
                    </div>
                </article>
                <div class="blog-details-navigate">
                    <div class="row">
                        <div class="col-md-6 col-lg-6">
                            <div class="blog-details-prev">
                                @if ($prePost)
                                    <h4><a href="{{ route('my-page.event.show', $prePost[0]['Id']) }}">{{ $prePost[0]['C2'] }}</a></h4>
                                    <a class="nav-arrow" href="{{ route('my-page.event.show', $prePost[0]['Id']) }}"><i class="icofont-arrow-left"></i>이전</a>
                                @endif
                            </div>
                        </div>
                        <div class="col-md-6 col-lg-6">
                            <div class="blog-details-next">
                                @if ($nextPost)
                                    <h4><a href="{{ route('my-page.event.show', $nextPost[0]['Id']) }}">{{ $nextPost[0]['C2'] }}</a></h4>
                                    <a class="nav-arrow" href="{{ route('my-page.event.show', $nextPost[0]['Id']) }}">다음<i class="icofont-arrow-right"></i></a>
                                @endif
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!--=====================================
BLOG GRID PART END
=======================================-->

@endsection
