@extends('views.layouts.master')
<link rel="stylesheet" href="{{ csset('/themes/point2u/pro/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

<div class="sub qna qna_view">
	<div class="container">
		<div class="navi">
			<a href="/"><i class="fa-solid fa-house"></i> 홈</a> > 커뮤니티 > Q&A
		</div>
		<div class="title">
			<h2>Q&A</h2>
		</div>
	</div>
    <!--=====================================
	BANNER PART START
	=======================================-->
	<!-- 필요없음 지움
	<section class="inner-section single-banner">
		<div class="container">
			<h2>1:1 상담</h2>
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a href="index.html">Home</a></li>
				<li class="breadcrumb-item active" aria-current="page">1:1 상담</li>
			</ol>
		</div>
	</section>
	-->
	<!--=====================================
	BANNER PART END
	=======================================-->

	<!--=====================================
		 BLOG DETAILS PART START
	=======================================-->
	<section class="inner-section blog-details-part qna-details blog-standard-details">
		<div class="container">
			<div class="row justify-content-center">
				<div class="col-lg-12">
					<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="fa-regular fa-calendar-days"></i>
												<span>{{ $post['C7'] }}</span>
											</li>
										</ul>
									</div>
								</div>
							</div>

							<!-- 내용 시작 -->
							<div class="blog-details-cont">
								{{ $post['C6'] }}
							</div>
							<!--// 내용 끝 -->
						</div>
					</article>

                    @if($post['C9'] === '1')
                        <div class="blog-details-comment">
                            <h3 class="comment-title">답변</h3>
                            <ul class="comment-list">
                                <li class="comment-item">
                                    <div class="comment-media">
                                        <h6 class="comment-meta">
                                            <!-- <a href="#">{{ $post['C13'] }}</a> -->
                                                <a href="#">{{ $post['C11'] }}</a>
                                            <span>{{ $post['C12'] }}</span>
                                        </h6>
                                    </div>
                                    <p class="comment-desc">{!! $post['C13'] !!}</p>
                                </li>
                            </ul>
                        </div>
                    @endif

					<div class="blog_bottom">
						<div class="blog-details-navigate">
							<div class="blog-details-prev">
								@if ($prePost)
									<!--<h4><a href="{{ route('1to1.show', $prePost[0]['Id']) }}">{{ $prePost[0]['C2'] }}</a></h4>-->
									<a class="nav-arrow" href="{{ route('1to1.show', $prePost[0]['Id']) }}"><i class="fa-solid fa-arrow-left"></i> 이전</a>
								@endif
							</div>
							<div class="blog-details-next">
								@if ($nextPost)
									<!--<h4><a href="{{ route('1to1.show', $nextPost[0]['Id']) }}">{{ $nextPost[0]['C2'] }}</a></h4>-->
									<a class="nav-arrow" href="{{ route('1to1.show', $nextPost[0]['Id']) }}">다음 <i class="fa-solid fa-arrow-right"></i></a>
								@endif
							</div>
						</div>
						<div class="btn_wrap filter-btn mb-0 blog-standard">
							<button type="button" class="btn btn_primary" onclick="location.href='{{ route('1to1.list') }}'">목록</button>
						</div>
					</div>

				</div>
			</div>
		</div>
	</section>
	<!--=====================================
		BLOG DETAILS PART END
	=======================================-->
</div>

@endsection
