<?php $__env->startSection('tab-title'); ?>| تیکت [<?php echo e(convertNumbers($tid, "EnToFa")); ?>] <?php $__env->stopSection(); ?>

<?php $__env->startSection("page-title"); ?> تیکت شماره <?php echo e(convertNumbers($tid, "EnToFa")); ?> <?php $__env->stopSection(); ?>

<?php $__env->startSection("page-info"); ?> وضعیت: <?php echo e($ticket->status == 0 ? 'باز' : 'بسته'); ?> <?php $__env->stopSection(); ?>

<?php $__env->startSection("page-styles"); ?>
    <style>.slimScrollDiv{height: 400px !important;} .chat-app {height: 400px !important;}</style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection("page-body"); ?>
    <section class="content">
        <div class="box direct-chat">
            <div class="box-header with-border bg-lighter">
                <h4 class="box-title">موضوع: <?php echo e($ticket->subject); ?></h4>
            </div>
            <div class="box-body">
                <div id="chat-app" class="direct-chat-messages chat-app">
                    <?php $__currentLoopData = $messages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php if($message->direction == 0): ?>
                            <div class="direct-chat-msg right mb-30">
                                <div class="clearfix mb-0">
                                    <span class="direct-chat-name pull-right">مدیر سایت</span>
                                </div>
                                <div class="direct-chat-text">
                                    <p><?php echo e($message->content); ?></p>
                                    <p class="direct-chat-timestamp text-muted ltr"><?php echo e(gregorianToJalali($message->datetime)); ?></p>
                                </div>
                            </div>
                        <?php else: ?>
                            <div class="direct-chat-msg mb-30">
                                <div class="clearfix mb-0">
                                    <span class="direct-chat-name"><?php echo e($ticket->firstname.' '.$ticket->lastname); ?></span>
                                </div>
                                <div class="direct-chat-text">
                                    <p><?php echo e($message->content); ?></p>
                                    <p class="direct-chat-timestamp text-muted ltr"><?php echo e(gregorianToJalali($message->datetime)); ?></p>
                                </div>
                            </div>
                        <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
            <?php if($ticket->status == 0): ?>
                <div class="box-footer">
                    <form action="#" method="POST">
                        <?php echo csrf_field(); ?>
                        <input type="hidden" name="tid" value="<?php echo e($ticket->id); ?>">
                        <div class="input-group">
                            <input type="text" name="message" placeholder="تایپ کنید ..." class="form-control">
                            <div class="input-group-addon">
                                <div class="align-self-end gap-items">
                                    <button type="submit" class="publisher-btn" href="#"><i class="fa fa-paper-plane"></i></button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            <?php endif; ?>
        </div>
    </section>
<?php $__env->stopSection(); ?>

<?php $__env->startSection("page-scripts"); ?>
    <script>
        $(document).ready(function() {
            $('#chat-app').scrollTop($('#chat-app').height());
        })
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make("v1/02_dash-template/layouts/layout-customer", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\gpumonsters\core\resources\views/v1/02_dash-template/customer-pages/ticket-single.blade.php ENDPATH**/ ?>