<?php if (isset($component)) { $__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\MasterLayout::class, ['assets' => $assets ?? []]); ?>
<?php $component->withName('master-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <div class="card card-block card-stretch">
                        <div class="card-body p-0">
                            <div class="d-flex justify-content-between align-items-center p-3">
                                <h5 class="font-weight-bold"><?php echo e(__('message.order_detail')); ?></h5>
                                <div class="">
                                    <?php if(Auth::user()->user_type == 'admin'): ?>
                                    <a href="<?php echo e(route('order.index')); ?>" class="float-right ml-1 btn btn-sm btn-primary"><i class="fa fa-angle-double-left"></i> <?php echo e(__('message.back')); ?></a>
                                    <?php else: ?>
                                    <a href="<?php echo e(route('home')); ?>" class="float-right ml-1 btn btn-sm btn-primary"><i class="fa fa-angle-double-left"></i> <?php echo e(__('message.back')); ?></a>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="row">
                        <div class="col-md-8">
                                <div class="card card-block">
                                    <div class="card-body mt-3 pt-0 pb-0">
                                        <div class="row">
                                            <div class="col-md-6">
                                                <h4 class="card-title mb-2 font-weight-bold"><?php echo e(__('message.parcel_details')); ?></h4>
                                                <div class="card card-block">
                                                    <div class="col-md-12">
                                                        <h6 class="card-title mb-2 mt-2 float-left"><?php echo e(__('message.parcel_type')); ?></h6>
                                                        <p class="mb-2 mt-2 float-right"><?php echo e(isset($data->parcel_type) ? $data->parcel_type : '-'); ?></p>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <h6 class="card-title mb-2 mt-2 float-left"><?php echo e(__('message.total_weight')); ?></h6>
                                                        <p class="mb-2 mt-2 float-right"><?php echo e(isset($data->total_weight) ? $data->total_weight : '-'); ?> <?php echo e(optional($data->country)->weight_type); ?></p>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <h6 class="card-title mb-2 mt-2 float-left"><?php echo e(__('message.total_parcel')); ?></h6>
                                                        <p class="mb-2 mt-2 float-right"><?php echo e(isset($data->total_parcel) ? $data->total_parcel : '-'); ?></p>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <h4 class="card-title mb-2 font-weight-bold"><?php echo e(__('message.payment_details')); ?></h4>
                                            <div class="card card-block">
                                                <div class="col-md-12">
                                                    <h6 class="card-title mb-2 mt-2 float-left"><?php echo e(__('message.payment_type')); ?></h6>
                                                    <p class="mb-2 mt-2 float-right"><?php echo e(isset($data->payment) ? optional($data->payment)->payment_type : '-'); ?></p>
                                                </div>
                                                <div class="col-md-12">
                                                    <h6 class="card-title mb-2 mt-2 float-left"><?php echo e(__('message.payment_status')); ?></h6>
                                                    <p class="mb-2 mt-2 float-right"><?php echo e(isset($data->payment) ? optional($data->payment)->payment_status : '-'); ?></p>
                                                </div>
                                                <div class="col-md-12">
                                                    <h6 class="card-title mb-2 mt-2 float-left"><?php echo e(__('message.payment_collect_from')); ?></h6>
                                                    <p class="mb-2 mt-2 float-right"><?php echo e(isset($data->payment_collect_from) ? __('message.'.$data->payment_collect_from) : '-'); ?></p>
                                                </div>
                                            </div>
                                            </div>
                                            <?php if($data->store_detail_id != null): ?>
                                                <h4 class="card-title mb-2 ml-3 font-weight-bold"><?php echo e(__('message.order_items')); ?></h4>
                                                <?php $__currentLoopData = $storeorder; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $orderdetail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <?php
                                                        $product = $orderdetail->product;
                                                        $productImage = getSingleMedia($product, 'product_image');
                                                    ?>
                                                    <div class="col-md-12">
                                                        <div class="card card-block">
                                                            <div class="row">
                                                                <div class="d-flex">
                                                                    <img src="<?php echo e($productImage); ?>" alt="Product Image" class="img-fluid mt-2 mb-2 ml-4" style="width: 120px; height: 60px;">
                                                                </div>
                                                                <div class="col-md-5">
                                                                    <h6 class="mt-3"><?php echo e(optional($orderdetail->product)->title); ?></h6>
                                                                    <h6 class="mt-2"><?php echo e(getPriceFormat($orderdetail->amount)); ?> <i class="fa fa-times"></i> <?php echo e(optional($orderdetail)->quantity); ?></h6>
                                                                </div>
                                                                <div class="col-md-5 d-flex align-items-center justify-content-end">
                                                                    <div class="text-center ml-5 mr-2">
                                                                        <h6><?php echo e(getPriceFormat($orderdetail->total_amount)); ?></h6>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <div class="card-body pb-0 pt-0">
                                        <div class="row">
                                            <div class="col-md-6">
                                                <h4 class="card-title mb-2 font-weight-bold"><?php echo e(__('message.pickup_address')); ?></h4>
                                                <div class="card card-block">
                                                    <div class="col-md-12">
                                                        <?php if($data['status'] == 'courier_picked_up' || $data['status'] == 'completed' || $data['status'] == 'courier_departed'): ?>
                                                            <p class="mb-3 mt-3"><span><?php echo e(__('message.picked')); ?></span>  <?php echo e(dateAgoFormate($data->pickup_datetime)); ?></p>
                                                        <?php endif; ?>
                                                        <p class="mb-3 mt-3 d-flex align-items-start">
                                                            <i class="fa fa-location-dot me-2"></i>
                                                            <span class="ml-2"><?php echo e($data->pickup_point['address']); ?></span>
                                                        </p>
                                                        <h6 class=" mb-3 mt-3"> <i class="fas fa-phone-alt"></i>  <?php echo e($data->pickup_point['contact_number'] ? $data->pickup_point['contact_number'] : ''); ?></h6>
                                                        <?php if(!empty($data->pickup_point['description'])): ?>
                                                            <p class="mb-2 mt-2"> <?php echo e(__('message.remark')); ?> <?php echo e($data->pickup_point['description']); ?></p>
                                                        <?php endif; ?>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-md-6">
                                                <h4 class="card-title mb-2 font-weight-bold"><?php echo e(__('message.delivery_address')); ?></h4>
                                                <div class="card card-block">
                                                    <div class="col-md-12">
                                                        <?php if($data['status'] == 'completed'): ?>
                                                            <p class="mb-3 mt-3"><span><?php echo e(__('message.delivered_at')); ?></span>  <?php echo e(dateAgoFormate($data->delivery_datetime)); ?></p>
                                                        <?php endif; ?>
                                                        <p class="mb-3 mt-3 d-flex align-items-start">
                                                            <i class="fa fa-location-dot me-2"></i>
                                                            <span class="ml-2"><?php echo e($data->delivery_point['address']); ?></span>
                                                        </p>
                                                        <h6 class=" mb-3 mt-3">  <i class="fas fa-phone-alt"></i>  <?php echo e($data->delivery_point['contact_number'] ? $data->delivery_point['contact_number'] : ''); ?></h6>
                                                        <?php if(!empty($data->delivery_point['description'])): ?>
                                                            <p class="mb-2 mt-2"> <?php echo e(__('message.remark')); ?> <?php echo e($data->delivery_point['description']); ?></p>
                                                        <?php endif; ?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="card-body pb-0 pt-0">
                                        <div class="row">
                                            <?php if($data['status'] == 'courier_picked_up' || $data['status'] == 'completed' || $data['status'] == 'courier_departed'): ?>
                                            <div class="col-md-6">
                                                <h4 class="card-title mb-1 font-weight-bold"><?php echo e(__('message.pickup_signature')); ?></h4>
                                                    <?php if( isset($data)&& optional($data)->hasMedia('pickup_time_signature') ): ?>
                                                    <div class="card card-block">
                                                        <div id="image-preview" class="d-flex flex-wrap col-md-12 ">
                                                            <?php $__currentLoopData = optional($data)->getMedia('pickup_time_signature'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $media): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <div class="col-md-4 mb-2 float-left">
                                                                    <a class="magnific-popup-image-gallery" href="<?php echo e($media->getUrl()); ?>" title="<?php echo e($media->name); ?>">
                                                                        <img id="<?php echo e($media->id); ?>_preview" src="<?php echo e($media->getUrl()); ?>" alt="<?php echo e($media->name); ?>" class="attachment-image mt-3">
                                                                    </a>
                                                                </div>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </div>
                                                    </div>
                                                    <?php else: ?>
                                                    <div class="card card-block">
                                                        <div class="col-md-12">
                                                        <img class="img-thumbnail w-50 d-block mx-auto image-fluid mb-2 mt-2 profile_image_preview" src="<?php echo e(getSingleMedia($data,'default', null)); ?>" alt="profile-pic">
                                                        </div>
                                                    </div>
                                                    <?php endif; ?>
                                            </div>
                                            <?php endif; ?>
                                            <?php if($data['status'] == 'completed'): ?>
                                            <div class="col-md-6">
                                                <h4 class="card-title mb-1 font-weight-bold"><?php echo e(__('message.delivery_signature')); ?></h4>
                                                    <?php if( isset($data)&& optional($data)->hasMedia('delivery_time_signature') ): ?>
                                                    <div class="card card-block">
                                                        <div id="image-preview" class="d-flex flex-wrap col-md-12 ">
                                                            <?php $__currentLoopData = optional($data)->getMedia('delivery_time_signature'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $media): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <div class="col-md-4 mb-2 float-left">
                                                                    <a class="magnific-popup-image-gallery" href="<?php echo e($media->getUrl()); ?>" title="<?php echo e($media->name); ?>">
                                                                        <img id="<?php echo e($media->id); ?>_preview" src="<?php echo e($media->getUrl()); ?>" alt="<?php echo e($media->name); ?>" class="attachment-image mt-3">
                                                                    </a>
                                                                </div>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </div>
                                                    </div>
                                                    <?php else: ?>
                                                    <div class="card card-block">
                                                        <div class="col-md-12">
                                                            <img class="img-thumbnail w-50 d-block mx-auto image-fluid mb-2 mt-2 profile_image_preview" src="<?php echo e(getSingleMedia($data,'default', null)); ?>" alt="profile-pic">
                                                        </div>
                                                    </div>
                                                    <?php endif; ?>
                                            </div>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <?php if($data['status'] == 'cancelled'): ?>
                                    <div class="card-body mt-0 pt-0 pb-0">
                                        <div class="row">
                                            <div class="col-md-12">
                                                <h4 class="card-title mb-2 font-weight-bold"><?php echo e(__('message.cancelled_reason')); ?></h4>
                                                <div class="card card-block">
                                                    <div class="col-md-12 mb-3 bg-dark-danger">
                                                        <h5 class="text-danger mt-2"><?php echo e(($data->reason)); ?></h5>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <?php endif; ?>
                                    <?php if($data['reason'] != null && $data['status'] != 'cancelled'): ?>
                                        <div class="card-body mt-0 pt-0 pb-0">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <h4 class="card-title mb-2 font-weight-bold"><?php echo e(__('message.return_reason')); ?></h4>
                                                    <div class="card card-block">
                                                        <div class="col-md-12 mb-3 bg-dark-danger">
                                                            <h5 class="text-danger mt-2"><?php echo e($data['reason']); ?></h5>
                                                             <a href="<?php echo e(route('order.show', $data['parent_order_id'])); ?>"><?php echo e(__('message.view_return_order')); ?></a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    <?php endif; ?>
                                    <?php if($complate_data != null): ?>
                                        <div class="card-body mt-0 pt-0 pb-0">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <h4 class="card-title mb-2 font-weight-bold"><?php echo e(__('message.return_reason')); ?></h4>
                                                    <div class="card card-block">
                                                        <div class="col-md-12 mb-3 bg-dark-danger">
                                                            <h5 class="text-danger mt-2"><?php echo e($complate_data->reason); ?></h5>
                                                                <a href="<?php echo e(route('order.show', $complate_data->id)); ?>"><?php echo e(__('message.view_new_order')); ?></a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    <?php endif; ?>
                                    <div class="card-body pt-0 pb-0">
                                        <div class="row">
                                            <div class="col-md-12 ">
                                                <div class="card card-block pl-2 pr-2">
                                                  <table style="border-style:none" class="table table-striped">
                                                        <thead>
                                                            <tr>
                                                                <th><?php echo e(__('message.description')); ?></th>
                                                                <th><?php echo e(__('message.sub_total')); ?></th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr>
                                                                <td><?php echo e(__('message.delivery_charges')); ?></td>
                                                                <td><?php echo e(getPriceFormat($data->fixed_charges)); ?></td>
                                                            </tr>
                                                            <?php if($data->weight_charge != null): ?>
                                                                <tr>
                                                                    <td><?php echo e(__('message.weight_charge')); ?></td>
                                                                    <td><?php echo e(getPriceFormat($data->weight_charge)); ?></td>
                                                                </tr>
                                                            <?php endif; ?>
                                                            <?php if(!empty($data->vehicle_data) && array_key_exists('price', $data->vehicle_data)): ?>
                                                                <tr>
                                                                    <td><?php echo e(__('message.vehicle_charge')); ?></td>
                                                                    <td><?php echo e(getPriceFormat($data->vehicle_data['price'])); ?></td>
                                                                </tr>
                                                            <?php endif; ?>
                                                            <?php if($data['distance_charge'] != '0'): ?>
                                                                <tr>
                                                                    <td><?php echo e(__('message.distance_charge')); ?></td>
                                                                    <td><?php echo e(getPriceFormat($data->distance_charge)); ?></td>
                                                                </tr>
                                                            <?php endif; ?>
                                                            <?php if($data->extra_charges != null): ?>
                                                                <tr>
                                                                    <th><?php echo e(__('message.extra_charges')); ?></th>
                                                                    <th></th>
                                                                </tr>
                                                            <?php endif; ?>
                                                            <?php if(!empty($data->extra_charges)): ?>
                                                                <?php
                                                                    if (is_string($data->extra_charges)) {
                                                                        $data->extra_charges = json_decode($data->extra_charges, true);
                                                                    }

                                                                    $extra_charges_texts = [];
                                                                    $extra_charges_values = [];
                                                                    $totall = $data->fixed_charges + $data->distance_charge + $data->weight_charge + (isset($order->vehicle_data['price']) ? $order->vehicle_data['price'] : 0);

                                                                    if (is_array($data->extra_charges)) {
                                                                        foreach ($data->extra_charges as $item) {
                                                                            if (isset($item['value_type'])) {
                                                                                $formatted_value = ($item['value_type'] == 'percentage') ? $item['value'] . '%' : getPriceFormat($item['value']);
                                                                                if ($item['value_type'] == 'percentage') {
                                                                                    $data_value = $totall * $item['value'] / 100;
                                                                                    $key = str_replace('_', ' ', ucfirst($item['key']));
                                                                                    $extra_charges_texts[] = $key . ' (' . $formatted_value . ')';
                                                                                    $extra_charges_values[] = getPriceFormat($data_value);
                                                                                } else {
                                                                                    $key = str_replace('_', ' ', ucfirst($item['key']));
                                                                                    $extra_charges_texts[] = $key . ' (' . $formatted_value . ')';
                                                                                    $extra_charges_values[] = $formatted_value;
                                                                                }
                                                                            }
                                                                        }
                                                                        if(isset($item['value_type'])){
                                                                            $values = [];
                                                                            $countFixed = 0;
                                                                            foreach ($data->extra_charges as $item) {
                                                                                if (in_array($item['value_type'], ['percentage', 'fixed'])) {
                                                                                    if ($item['value_type'] == 'percentage') {
                                                                                        $values[] = $totall * $item['value'] / 100;
                                                                                    } elseif ($item['value_type'] == 'fixed') {
                                                                                        $values[] = $item['value'];
                                                                                    }
                                                                                }
                                                                            }
                                                                            $totalextracharge = array_sum($values);
                                                                        }
                                                                    }
                                                                    $extra_charges_text_with_br = implode('<br>', $extra_charges_texts);
                                                                    $extra_charges_text_values = implode('<br>', $extra_charges_values);
                                                                ?>
                                                                <?php $__currentLoopData = $extra_charges_texts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $text): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <tr>
                                                                        <td><?php echo e($text); ?></td>
                                                                        <td><?php echo e($extra_charges_values[$index]); ?></td>
                                                                    </tr>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                            <tr>
                                                                <?php if($data['status'] == 'cancelled'): ?>
                                                                    <?php
                                                                       $original_total_amount = ( $data->tips ?? 0 ) + optional($data->payment)->total_amount + $data->weight_charge + (isset($order->vehicle_data['price']) ? $order->vehicle_data['price'] : 0) ;
                                                                        $cancel_charges = optional($data->payment)->cancel_charges;
                                                                        $total_with_cancel_charges = ( $data->tips ?? 0 ) + $cancel_charges;
                                                                    ?>
                                                                    <td class="font-weight-bold"><?php echo e(__('message.total')); ?></td>
                                                                    <td class="font-weight-bold">
                                                                        <del><?php echo e(getPriceFormat($original_total_amount)); ?></del>
                                                                    </td>
                                                                <?php else: ?>
                                                                    <?php
                                                                   if (isset($data->extra_charges)) {
                                                                            $totalextracharge = 0;
                                                                            if (isset($values)) {
                                                                                $totalextracharge = array_sum($values);
                                                                            }
                                                                            $total_amount = $data->fixed_charges + $data->distance_charge + $data->weight_charge +(isset($order->vehicle_data['price']) ? $order->vehicle_data['price'] : 0) + $totalextracharge;
                                                                        } else {
                                                                            $total_amount = $data->fixed_charges + $data->distance_charge + $data->weight_charge + (isset($order->vehicle_data['price']) ? $order->vehicle_data['price'] : 0);
                                                                        }

                                                                    ?>
                                                                    <td class="font-weight-bold"><?php echo e(__('message.total')); ?></td>
                                                                    <td class="font-weight-bold"><?php echo e(getPriceFormat($total_amount)); ?></td>
                                                                <?php endif; ?>
                                                            </tr>
                                                            <?php if($data['status'] == 'cancelled'): ?>
                                                                <?php
                                                                    $original_total_amount = ( $data->tips ?? 0 ) + optional($data->payment)->total_amount;
                                                                    $cancel_charges = optional($data->payment)->cancel_charges;
                                                                    $total_with_cancel_charges = ( $data->tips ?? 0 ) + $cancel_charges;
                                                                ?>
                                                                <tr>
                                                                    <td class="font-weight-bold"><?php echo e(__('message.cancel_charges')); ?></td>
                                                                    <td class="font-weight-bold"><?php echo e(getPriceFormat($total_with_cancel_charges)); ?></td>
                                                                </tr>
                                                            <?php endif; ?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                        </div>
                        <div class="col-md-4">
                            <?php if(auth()->user()->user_type == 'client'): ?>
                            <?php else: ?>
                            <div class="card">
                                <div class="card-body">
                                    <h4 class="card-title mb-0"> <?php echo e(__('message.about_user')); ?></h4><hr>
                                    <div class="mt-2">
                                        <div class="row">
                                            <div class="col-md-4">
                                                <img class="rounded-circle d-block mx-auto image-fluid mb-3 profile_image_preview" src="<?php echo e(getSingleMedia($data->client,'profile_image', null)); ?>" alt="profile-pic" width="80px" height="80px">
                                            </div>
                                            <div class="col-md-8">
                                                <h6 class="mt-1 "><?php echo e(optional($data->client)->name ?? ''); ?></h6>
                                                <h6 class="mt-1 "><?php echo e(auth()->user()->hasRole('admin') ? optional($data->client)->email : maskSensitiveInfo('email',optional($data->client)->email)); ?></h6>
                                                <h6 class="mt-1 "><?php echo e(auth()->user()->hasRole('admin') ? optional($data->client)->contact_number : maskSensitiveInfo('contact_number',optional($data->client)->contact_number)); ?></h6>
                                                
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php endif; ?>
                            <?php if($data['delivery_man_id'] != null): ?>
                                <div class="card">
                                    <div class="card-body">
                                        <h4 class="card-title mb-0"> <?php echo e(__('message.about_delivery_man')); ?></h4><hr>
                                        <div class="mt-2">
                                            <div class="row">
                                                <div class="col-md-4">
                                                    <img class="rounded-circle d-block mx-auto image-fluid mb-3 profile_image_preview" src="<?php echo e(getSingleMedia($data->delivery_man,'profile_image', null)); ?>" alt="profile-pic" width="80px" height="80px">
                                                </div>
                                                <div class="col-md-8">
                                                    <h6 class="mt-1"><?php echo e(optional($data->delivery_man)->name ?? ''); ?></h6>
                                                    <h6 class="mt-1"><?php echo e(auth()->user()->hasRole('admin') ? optional($data->delivery_man)->email : maskSensitiveInfo('email',optional($data->delivery_man)->email)); ?></h6>
                                                    <h6 class="mt-1"><?php echo e(auth()->user()->hasRole('admin') ? optional($data->delivery_man)->contact_number : maskSensitiveInfo('contact_number',optional($data->delivery_man)->contact_number)); ?></h6>
                                                    <div class="mt-1">
                                                        <h6><?php echo e(optional($data->user)->address ?? ''); ?></h6>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <?php else: ?>
                            <?php endif; ?>

                            <?php if( isset($data) && optional($data->vehicle)->hasMedia('vehicle_image') ): ?>
                                <div class="card">
                                    <div class="card-body">
                                        <div class="row">
                                            <div class="col-md-12">
                                                <h4 class="mb-2 flex-wrap col-md-12 text-start"><?php echo e(__('message.vehicle')); ?></h4><hr>
                                            </div>
                                            <div id="image-preview" class="d-flex flex-wrap col-md-12">
                                                <?php $__currentLoopData = optional($data->vehicle)->getMedia('vehicle_image'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $media): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <div class="col-md-6 mb-0 float-left">
                                                        <a class="image-popup-vertical-fit" href="<?php echo e($media->getUrl()); ?>" title="<?php echo e($media->name); ?>">
                                                            <img id="<?php echo e($media->id); ?>_preview" src="<?php echo e($media->getUrl()); ?>" alt="<?php echo e($media->name); ?>" class="attachment-image mt-1 w-100">
                                                        </a>
                                                    </div>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                <div id="image-preview" class="d-flex flex-wrap col-md-6 ">
                                                    <h6 class="mb-2 flex-wrap  text-left"><?php echo e(__('message.vehicle_name')); ?></h6>
                                                    <p class="mb-2 flex-wrap col-md-6 text-left"><?php echo e(optional($data->vehicle)->title); ?></p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <?php endif; ?>
                            <div class="card">
                                <div class="card-body">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <h4 class="mb-2 flex-wrap col-md-12 text-first"><?php echo e(__('message.orderhistory')); ?></h4><hr>
                                            <?php if(count($data->orderhistory) > 0): ?>
                                                <div class="card card-block">
                                                    <div class="card-body">
                                                        <div class="mm-timeline0 m-0 d-flex align-items-center justify-content-between position-relative">
                                                            <ul class="list-inline p-0 m-0 ">
                                                                <?php $__currentLoopData = $data->orderhistory; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $history): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <?php
                                                                        switch ($history->history_type) {
                                                                            case 'create':
                                                                                $iconClass = 'fa-solid fa-file-pen';
                                                                                break;
                                                                            case 'courier_assigned':
                                                                                $iconClass = 'fa-solid fa-file-signature';
                                                                                break;
                                                                            case 'courier_arrived':
                                                                                $iconClass = 'fa-solid fa-file-arrow-down';
                                                                                break;
                                                                            case 'courier_picked_up':
                                                                                $iconClass = 'fa-solid fa-truck-fast';
                                                                                break;
                                                                            case 'courier_departed':
                                                                                $iconClass = 'fa fa-plane-departure';
                                                                                break;
                                                                            case 'payment_status_message':
                                                                                $iconClass = 'fa fa-credit-card';
                                                                                break;
                                                                            case 'courier_transfer':
                                                                                $iconClass = 'fas fa-box';
                                                                                break;
                                                                            case 'completed':
                                                                                $iconClass = 'fa fa-square-check';
                                                                                break;
                                                                            case 'return':
                                                                                $iconClass = "fa fa-rotate";
                                                                                break;
                                                                            default:
                                                                                $iconClass = 'fa-solid fa-question-circle';
                                                                                break;
                                                                        }
                                                                    ?>
                                                                    <li>
                                                                        <div class="timeline-dots1 list-inline-item float-right">
                                                                            <i class="<?php echo e($iconClass); ?>"></i>
                                                                        </div>
                                                                        <h6 class="float-left mb-1"><?php echo e(__('message.'. $history->history_type)); ?></h6>
                                                                        <small class="float-right mt-1"><?php echo e(dateAgoFormate($history->created_at)); ?></small>
                                                                        <div class="d-inline-block w-100">
                                                                            <p><?php echo e($history->history_message); ?></p>
                                                                        </div>
                                                                    </li>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            </ul>
                                                        </div>
                                                    </div>
                                                </div>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23)): ?>
<?php $component = $__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23; ?>
<?php unset($__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23); ?>
<?php endif; ?>


<?php /**PATH /home/atharvatek/mxunzo.atharvatek.com/resources/views/order/show.blade.php ENDPATH**/ ?>