<?php if (isset($component)) { $__componentOriginal1a6cca1fb3b05e19b47840b98800a235 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal1a6cca1fb3b05e19b47840b98800a235 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.layouts.dashboard','data' => ['title' => 'Tracking - '.e($shipment->tracking_code).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('layouts.dashboard'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Tracking - '.e($shipment->tracking_code).'']); ?>
    <?php if (isset($component)) { $__componentOriginald938e474240bb91dae7eded41f706ecb = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald938e474240bb91dae7eded41f706ecb = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.widgets.page-header','data' => ['title' => 'Tracking - '.e($shipment->tracking_code).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('widgets.page-header'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Tracking - '.e($shipment->tracking_code).'']); ?>
        <div class="breadcrumb-item"><a href="javascript:void(0)"> Manage Trackings </a></div>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald938e474240bb91dae7eded41f706ecb)): ?>
<?php $attributes = $__attributesOriginald938e474240bb91dae7eded41f706ecb; ?>
<?php unset($__attributesOriginald938e474240bb91dae7eded41f706ecb); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald938e474240bb91dae7eded41f706ecb)): ?>
<?php $component = $__componentOriginald938e474240bb91dae7eded41f706ecb; ?>
<?php unset($__componentOriginald938e474240bb91dae7eded41f706ecb); ?>
<?php endif; ?>

    <div class="container">
        <div class="card">
            <div class="card-body">

                <div class="d-flex align-items-center justify-content-between">
                    <div class="logo">
                        <img alt="logo" class="img-fluid" src="<?php echo e($settings->site_logo); ?>">
                    </div>
                    <div class="fw-bold">
                        <h5 class="mb-0">Tracking Code</h5>
                        <span><?php echo e($shipment->tracking_code); ?></span> <i x-data class="icon-copy feather" role="button"
                            @click="$clipboard(<?php echo \Illuminate\Support\Js::from($shipment->tracking_code)->toHtml() ?>, $el)"></i>
                    </div>
                </div>

                <div class="row mt-4">
                    <div class="col-md-6 mb-3">
                        <span>Date Sent</span>
                        <div class="mt-1 text-dark fw-bold"><?php echo e($tracking->date_sent->format('d/m/Y')); ?></div>
                    </div>
                    <div class="col-md-6 mb-3">
                        <span>Expected Arrival Date</span>
                        <div class="mt-1 text-dark fw-bold"><?php echo e($tracking->date_expected->format('d/m/Y')); ?></div>
                    </div>
                </div>

                <div class="mt-5">
                    <h5>Tracking Details</h5>
                    <table class="table">
                        <thead>
                            <tr>
                                <th>Item</th>
                                <th>Details</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Tracking Status</td>
                                <td>
                                    <div
                                        class="d-flex align-items-center text-<?php echo e(status_class($tracking->status_code)); ?>">
                                        <span
                                            class="badge-dot me-2 bg-<?php echo e(status_class($tracking->status_code)); ?>"></span>
                                        <span class="text-capitalize"><?php echo status($tracking->status_code); ?></span>
                                    </div>
                                </td>
                            </tr>

                            <?php if($tracking->status_code == 0): ?>
                                <tr>
                                    <td>Hold Reason</td>
                                    <td><?php echo e($tracking->hold_reason); ?> </td>
                                </tr>
                            <?php endif; ?>

                            <tr>
                                <td>Date Sent</td>
                                <td><?php echo e($tracking->date_sent->format('m/d/Y')); ?></td>
                            </tr>

                            <tr>
                                <td>Date Expected</td>
                                <td><?php echo e($tracking->date_expected->format('m/d/Y')); ?></td>
                            </tr>

                            <tr>
                                <td>Progress</td>
                                <td><?php echo e($tracking->progress); ?>% </td>
                            </tr>

                            <tr>
                                <td>Current Location</td>
                                <td><?php echo e($tracking->current_location); ?> </td>
                            </tr>
                        </tbody>
                    </table>
                </div>


                <div class="row mt-4">
                    <div class="col-md-6 mb-3">
                        <span class="fw-bold">Sender Details:</span>
                        <h5 class="fw-bold mt-2"><?php echo e($shipment->sender_name); ?></h5>
                        <address>
                            <p>
                                <span><?php echo e($shipment->sender_address); ?></span><br><br>
                                <span title="Phone" class="text-dark fw-bold">Phone:
                                </span><span><?php echo e($shipment->sender_phone); ?></span><br>
                                <span title="Phone" class="text-dark fw-bold">Email:
                                </span><span><?php echo e($shipment->sender_email); ?></span><br>
                                <span title="Phone" class="text-dark fw-bold">Country:
                                </span><span><?php echo e($shipment->sender_country); ?></span><br>
                            </p>
                        </address>
                    </div>

                    <div class="col-md-6 mb-3">
                        <span class="fw-bold">Receiver Details:</span>
                        <h5 class="fw-bold mt-2"><?php echo e($shipment->receiver_name); ?></h5>
                        <address>
                            <p>
                                <span><?php echo e($shipment->receiver_address); ?></span><br><br>
                                <span title="Phone" class="text-dark fw-bold">Phone:
                                </span><span><?php echo e($shipment->receiver_phone); ?></span><br>
                                <span title="Phone" class="text-dark fw-bold">Email:
                                </span><span><?php echo e($shipment->receiver_email); ?></span><br>
                                <span title="Phone" class="text-dark fw-bold">Country:
                                </span><span><?php echo e($shipment->receiver_country); ?></span><br>
                            </p>
                        </address>
                    </div>
                </div>

                <div class="d-flex justify-content-end mt-5">
                    <div class="text-end">
                        <h5 class="fw-bold mt-3"><span class="ms-1">Grand Total:
                            </span><span><?php echo e($settings->currency . number_format($shipment->amount, 2)); ?></span>
                        </h5>
                    </div>
                </div>

                <div class="border-top my-3"></div>

                <div class="row" x-data>
                    <div class="col-xl-6 col-sm-12 col-md-12 mb-3" x-data="{ show_action: false }">
                        <button class="btn btn-primary" @click="show_action=!show_action">
                            <i class="feather icon-box"></i>
                            Actions
                            <i class="feather" :class="!show_action ? 'icon-chevron-right' : 'icon-chevron-left'"></i>
                        </button>

                        <button class="btn btn-info" x-show="show_action" x-cloak
                            x-transition:enter="animate__animated animate__bounceInRight"
                            x-transition:leave="animate__animated animate__bounceOutLeft" data-bs-toggle="modal"
                            data-bs-target="#edit-tracking">
                            <i class="feather icon-edit"></i> Edit
                        </button>

                        <button class="btn btn-info" x-show="show_action" x-cloak
                            x-transition:enter="animate__animated animate__bounceInRight"
                            x-transition:leave="animate__animated animate__bounceOutLeft" data-bs-toggle="modal"
                            data-bs-target="#send-email">
                            <i class="feather icon-mail"></i> Send Email to Shipment Receiver
                        </button>
                    </div>

                    <div class="col-xl-6 col-sm-12 col-md-12 text-end" x-data="invoice" x-init="tracking_code = <?php echo \Illuminate\Support\Js::from($shipment->tracking_code)->toHtml() ?>">
                        <button class="btn btn-info" @click="download" :disabled="processing">
                            <i class="la-file-pdf la"></i> Download
                        </button>

                        <button class="btn btn-info" @click="stream">
                            <i class="la-file-pdf la"></i> Stream
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php echo $__env->make('partials.tracking.edit-modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('partials.email-modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <?php if(session('success')): ?>
        <script>
            toast.success(<?php echo \Illuminate\Support\Js::from(session('success'))->toHtml() ?>)
        </script>
    <?php endif; ?>
    <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"></script>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal1a6cca1fb3b05e19b47840b98800a235)): ?>
<?php $attributes = $__attributesOriginal1a6cca1fb3b05e19b47840b98800a235; ?>
<?php unset($__attributesOriginal1a6cca1fb3b05e19b47840b98800a235); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1a6cca1fb3b05e19b47840b98800a235)): ?>
<?php $component = $__componentOriginal1a6cca1fb3b05e19b47840b98800a235; ?>
<?php unset($__componentOriginal1a6cca1fb3b05e19b47840b98800a235); ?>
<?php endif; ?>
<?php /**PATH /home/u810403078/domains/probaselogistics.com/public_html/resources/views/admin/tracking/single.blade.php ENDPATH**/ ?>