<?php $__env->startSection('title', $pagePayload->title); ?>

<?php $__env->startPush('css'); ?>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('js'); ?>
<script>
	function replyComment(id) {
		if (id) {
			document.forms['comment-form'].elements['reply_id'].value = id;
			document.forms['comment-form'].elements['comment'].focus();

			const elemReplyTo = document.getElementById('replyTo');

			const elemReplyToSpan = elemReplyTo.querySelector('span');
			elemReplyToSpan.innerText = document.querySelector(`[data-id="${id}"] h5`).innerText;

			elemReplyTo.classList.remove('hide');
		} else {
			document.forms['comment-form'].elements['reply_id'].value = '';
			document.forms['comment-form'].elements['comment'].focus();

			const elemReplyTo = document.getElementById('replyTo');
			elemReplyTo.classList.add('hide');
		}
	}
</script>
<?php $__env->stopPush(); ?>
<?php
	$pagePayload->siteManagement['site.components.banner']->title->value = $pagePayload->siteManagement['site.components.banner']->subtitle->value;
	$pagePayload->siteManagement['site.components.banner']->subtitle->value = $pagePayload->title;
?>
<?php $__env->startSection('header'); ?>
	<?php echo $__env->renderWhen(isset($pagePayload->siteManagement['site.components.banner']), 'site.components.banner', [ 'payload' => $pagePayload->siteManagement['site.components.banner'] ?? null ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path'])); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
	<section id="blog-post">
		<div class="container">
			<div  style="margin: -210px 0">
				<div class="row header-bottom">
					<div class="col-sm-12 col-lg-8"  style="width: 100%">
						<div class="single-blog-post">
							<div class="blog-thumb mb-3">
								<a href="#"><img class="blog-post-img" src="<?php echo e(asset($post->image)); ?>" alt="img"></a>
							</div>
							<div class="inner-blog-content">
								<ul class="blog-post-meta">
									<li><a href=""><i class="far fa-user"></i><?php echo e($post->blogCategory->name); ?></a></li>
									<li><a href=""><i class="fa-solid fa-comment"></i>Comentários (<?php echo e($post->count_comments); ?>)</a></li>
								</ul>
							</div>
							<h2><?php echo e($post->title); ?></h2>
							<p><?php echo e($post->descr); ?></p>
							<p class="p-about"><?php echo $post->content; ?></p>
						</div>
						<div id="blog-comment-section">
							<div class="single-comments-section">
								<h4 class="single-content-title">Comentários</h4>
								<div class="single-commentor">
									<ul>
										<?php $__currentLoopData = $comments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $comment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
											<?php echo $__env->make('site.pages.blog.commentMsg', ['comment' => $comment], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
										<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
									</ul>
								</div>
							</div>
							<div class="comment-reply-box mt-75">
								<h4 class="single-content-title">Deixe uma resposta</h4>
								<form name="comment-form" class="comment-form" action="<?php echo e(route('blog.comment', [ 'blog' => $post->slug ])); ?>" method="POST">
									<?php echo csrf_field(); ?>
									<div id="replyTo" class="hide">
										<h3>Responder a: <span data-to></span></h3>
										<div>
											<a href="javascript:replyComment(null)">Cancelar</a>
										</div>
										<input type="hidden" name="reply_id" value=""/>
									</div>
									<label for="message">Mensagem*</label>
									<textarea id="message" name="comment" placeholder="Sua mensagem*"></textarea>
									<div class="row">
										<div class="col-md-6">
											<label for="name">Nome*</label>
											<input name="name" type="text" placeholder="Nome*" />
										</div>
										<div class="col-md-6">
											<label for="email">Email*</label>
											<input name="email" type="email" placeholder="Email*" />
										</div>
									</div>
									<button class="btn">Postar Comentário</button>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('site.layouts.mazfer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/gphostc1/public_html/mazfer/resources/views/site/pages/blog/blogViewPage.blade.php ENDPATH**/ ?>