<x-master-layout :assets="$assets ?? []">
        <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">{{__('message.order_detail')}}</h5>
                                <div class="">
                                    @if(Auth::user()->user_type == 'admin')
                                    <a href="{{ route('order.index') }}" class="float-right ml-1 btn btn-sm btn-primary"><i class="fa fa-angle-double-left"></i> {{ __('message.back') }}</a>
                                    @else
                                    <a href="{{ route('home') }}" class="float-right ml-1 btn btn-sm btn-primary"><i class="fa fa-angle-double-left"></i> {{ __('message.back') }}</a>
                                    @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">{{ __('message.parcel_details') }}</h4>
                                                <div class="card card-block">
                                                    <div class="col-md-12">
                                                        <h6 class="card-title mb-2 mt-2 float-left">{{ __('message.parcel_type') }}</h6>
                                                        <p class="mb-2 mt-2 float-right">{{ isset($data->parcel_type) ? $data->parcel_type : '-' }}</p>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <h6 class="card-title mb-2 mt-2 float-left">{{ __('message.total_weight') }}</h6>
                                                        <p class="mb-2 mt-2 float-right">{{ isset($data->total_weight) ? $data->total_weight : '-' }} {{optional($data->country)->weight_type}}</p>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <h6 class="card-title mb-2 mt-2 float-left">{{ __('message.total_parcel') }}</h6>
                                                        <p class="mb-2 mt-2 float-right">{{ 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">{{ __('message.payment_details') }}</h4>
                                            <div class="card card-block">
                                                <div class="col-md-12">
                                                    <h6 class="card-title mb-2 mt-2 float-left">{{ __('message.payment_type') }}</h6>
                                                    <p class="mb-2 mt-2 float-right">{{ 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">{{ __('message.payment_status') }}</h6>
                                                    <p class="mb-2 mt-2 float-right">{{ 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">{{ __('message.payment_collect_from') }}</h6>
                                                    <p class="mb-2 mt-2 float-right">{{ isset($data->payment_collect_from) ? __('message.'.$data->payment_collect_from) : '-' }}</p>
                                                </div>
                                            </div>
                                            </div>
                                            @if($data->store_detail_id != null)
                                                <h4 class="card-title mb-2 ml-3 font-weight-bold">{{ __('message.order_items') }}</h4>
                                                @foreach ($storeorder as $orderdetail )
                                                    @php
                                                        $product = $orderdetail->product;
                                                        $productImage = getSingleMedia($product, 'product_image');
                                                    @endphp
                                                    <div class="col-md-12">
                                                        <div class="card card-block">
                                                            <div class="row">
                                                                <div class="d-flex">
                                                                    <img src="{{ $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">{{ optional($orderdetail->product)->title }}</h6>
                                                                    <h6 class="mt-2">{{ getPriceFormat($orderdetail->amount) }} <i class="fa fa-times"></i> {{ 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>{{ getPriceFormat($orderdetail->total_amount) }}</h6>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                @endforeach
                                            @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">{{ __('message.pickup_address') }}</h4>
                                                <div class="card card-block">
                                                    <div class="col-md-12">
                                                        @if($data['status'] == 'courier_picked_up' || $data['status'] == 'completed' || $data['status'] == 'courier_departed')
                                                            <p class="mb-3 mt-3"><span>{{__('message.picked')}}</span>  {{ dateAgoFormate($data->pickup_datetime) }}</p>
                                                        @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">{{ $data->pickup_point['address'] }}</span>
                                                        </p>
                                                        <h6 class=" mb-3 mt-3"> <i class="fas fa-phone-alt"></i>  {{  $data->pickup_point['contact_number'] ? $data->pickup_point['contact_number'] : '' }}</h6>
                                                        @if(!empty($data->pickup_point['description']))
                                                            <p class="mb-2 mt-2"> {{ __('message.remark') }} {{ $data->pickup_point['description'] }}</p>
                                                        @endif
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-md-6">
                                                <h4 class="card-title mb-2 font-weight-bold">{{ __('message.delivery_address') }}</h4>
                                                <div class="card card-block">
                                                    <div class="col-md-12">
                                                        @if($data['status'] == 'completed')
                                                            <p class="mb-3 mt-3"><span>{{__('message.delivered_at')}}</span>  {{  dateAgoFormate($data->delivery_datetime) }}</p>
                                                        @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">{{ $data->delivery_point['address'] }}</span>
                                                        </p>
                                                        <h6 class=" mb-3 mt-3">  <i class="fas fa-phone-alt"></i>  {{  $data->delivery_point['contact_number'] ? $data->delivery_point['contact_number'] : ''}}</h6>
                                                        @if(!empty($data->delivery_point['description']))
                                                            <p class="mb-2 mt-2"> {{ __('message.remark') }} {{ $data->delivery_point['description'] }}</p>
                                                        @endif
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="card-body pb-0 pt-0">
                                        <div class="row">
                                            @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">{{ __('message.pickup_signature') }}</h4>
                                                    @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 ">
                                                            @foreach(optional($data)->getMedia('pickup_time_signature') as $media)
                                                                <div class="col-md-4 mb-2 float-left">
                                                                    <a class="magnific-popup-image-gallery" href="{{ $media->getUrl() }}" title="{{ $media->name }}">
                                                                        <img id="{{ $media->id }}_preview" src="{{ $media->getUrl() }}" alt="{{ $media->name }}" class="attachment-image mt-3">
                                                                    </a>
                                                                </div>
                                                            @endforeach
                                                        </div>
                                                    </div>
                                                    @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="{{ getSingleMedia($data,'default', null) }}" alt="profile-pic">
                                                        </div>
                                                    </div>
                                                    @endif
                                            </div>
                                            @endif
                                            @if($data['status'] == 'completed')
                                            <div class="col-md-6">
                                                <h4 class="card-title mb-1 font-weight-bold">{{ __('message.delivery_signature') }}</h4>
                                                    @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 ">
                                                            @foreach(optional($data)->getMedia('delivery_time_signature') as $media)
                                                                <div class="col-md-4 mb-2 float-left">
                                                                    <a class="magnific-popup-image-gallery" href="{{ $media->getUrl() }}" title="{{ $media->name }}">
                                                                        <img id="{{ $media->id }}_preview" src="{{ $media->getUrl() }}" alt="{{ $media->name }}" class="attachment-image mt-3">
                                                                    </a>
                                                                </div>
                                                            @endforeach
                                                        </div>
                                                    </div>
                                                    @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="{{ getSingleMedia($data,'default', null) }}" alt="profile-pic">
                                                        </div>
                                                    </div>
                                                    @endif
                                            </div>
                                            @endif
                                        </div>
                                    </div>
                                    @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">{{ __('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">{{($data->reason)}}</h5>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    @endif
                                    @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">{{ __('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">{{ $data['reason'] }}</h5>
                                                             <a href="{{ route('order.show', $data['parent_order_id']) }}">{{ __('message.view_return_order')}}</a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    @endif
                                    @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">{{ __('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">{{ $complate_data->reason }}</h5>
                                                                <a href="{{ route('order.show', $complate_data->id) }}">{{ __('message.view_new_order')}}</a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    @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>{{ __('message.description') }}</th>
                                                                <th>{{ __('message.sub_total') }}</th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr>
                                                                <td>{{ __('message.delivery_charges') }}</td>
                                                                <td>{{ getPriceFormat($data->fixed_charges) }}</td>
                                                            </tr>
                                                            @if ($data->weight_charge != null)
                                                                <tr>
                                                                    <td>{{ __('message.weight_charge') }}</td>
                                                                    <td>{{ getPriceFormat($data->weight_charge) }}</td>
                                                                </tr>
                                                            @endif
                                                            @if(!empty($data->vehicle_data) && array_key_exists('price', $data->vehicle_data))
                                                                <tr>
                                                                    <td>{{ __('message.vehicle_charge') }}</td>
                                                                    <td>{{ getPriceFormat($data->vehicle_data['price']) }}</td>
                                                                </tr>
                                                            @endif
                                                            @if ($data['distance_charge'] != '0')
                                                                <tr>
                                                                    <td>{{ __('message.distance_charge') }}</td>
                                                                    <td>{{ getPriceFormat($data->distance_charge) }}</td>
                                                                </tr>
                                                            @endif
                                                            @if($data->extra_charges != null)
                                                                <tr>
                                                                    <th>{{ __('message.extra_charges') }}</th>
                                                                    <th></th>
                                                                </tr>
                                                            @endif
                                                            @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);
                                                                @endphp
                                                                @foreach ($extra_charges_texts as $index => $text)
                                                                    <tr>
                                                                        <td>{{ $text }}</td>
                                                                        <td>{{ $extra_charges_values[$index] }}</td>
                                                                    </tr>
                                                                @endforeach
                                                            @endif
                                                            <tr>
                                                                @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;
                                                                    @endphp
                                                                    <td class="font-weight-bold">{{ __('message.total') }}</td>
                                                                    <td class="font-weight-bold">
                                                                        <del>{{ getPriceFormat($original_total_amount) }}</del>
                                                                    </td>
                                                                @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);
                                                                        }

                                                                    @endphp
                                                                    <td class="font-weight-bold">{{ __('message.total') }}</td>
                                                                    <td class="font-weight-bold">{{ getPriceFormat($total_amount) }}</td>
                                                                @endif
                                                            </tr>
                                                            @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;
                                                                @endphp
                                                                <tr>
                                                                    <td class="font-weight-bold">{{ __('message.cancel_charges') }}</td>
                                                                    <td class="font-weight-bold">{{ getPriceFormat($total_with_cancel_charges) }}</td>
                                                                </tr>
                                                            @endif
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                        </div>
                        <div class="col-md-4">
                            @if(auth()->user()->user_type == 'client')
                            @else
                            <div class="card">
                                <div class="card-body">
                                    <h4 class="card-title mb-0"> {{ __('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="{{ getSingleMedia($data->client,'profile_image', null) }}" alt="profile-pic" width="80px" height="80px">
                                            </div>
                                            <div class="col-md-8">
                                                <h6 class="mt-1 ">{{ optional($data->client)->name ?? '' }}</h6>
                                                <h6 class="mt-1 ">{{ auth()->user()->hasRole('admin') ? optional($data->client)->email : maskSensitiveInfo('email',optional($data->client)->email) }}</h6>
                                                <h6 class="mt-1 ">{{ auth()->user()->hasRole('admin') ? optional($data->client)->contact_number : maskSensitiveInfo('contact_number',optional($data->client)->contact_number) }}</h6>
                                                {{-- <div class="mt-3">
                                                    <h6>{{ optional($data->client)->address ?? '' }}</h6>
                                                </div> --}}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            @endif
                            @if($data['delivery_man_id'] != null)
                                <div class="card">
                                    <div class="card-body">
                                        <h4 class="card-title mb-0"> {{ __('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="{{ getSingleMedia($data->delivery_man,'profile_image', null) }}" alt="profile-pic" width="80px" height="80px">
                                                </div>
                                                <div class="col-md-8">
                                                    <h6 class="mt-1">{{ optional($data->delivery_man)->name ?? '' }}</h6>
                                                    <h6 class="mt-1">{{ auth()->user()->hasRole('admin') ? optional($data->delivery_man)->email : maskSensitiveInfo('email',optional($data->delivery_man)->email) }}</h6>
                                                    <h6 class="mt-1">{{ 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>{{ optional($data->user)->address ?? '' }}</h6>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            @else
                            @endif

                            @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">{{ __('message.vehicle') }}</h4><hr>
                                            </div>
                                            <div id="image-preview" class="d-flex flex-wrap col-md-12">
                                                @foreach(optional($data->vehicle)->getMedia('vehicle_image') as $media)
                                                    <div class="col-md-6 mb-0 float-left">
                                                        <a class="image-popup-vertical-fit" href="{{ $media->getUrl() }}" title="{{ $media->name }}">
                                                            <img id="{{ $media->id }}_preview" src="{{ $media->getUrl() }}" alt="{{ $media->name }}" class="attachment-image mt-1 w-100">
                                                        </a>
                                                    </div>
                                                @endforeach
                                                <div id="image-preview" class="d-flex flex-wrap col-md-6 ">
                                                    <h6 class="mb-2 flex-wrap  text-left">{{ __('message.vehicle_name') }}</h6>
                                                    <p class="mb-2 flex-wrap col-md-6 text-left">{{optional($data->vehicle)->title}}</p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            @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">{{ __('message.orderhistory') }}</h4><hr>
                                            @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 ">
                                                                @foreach($data->orderhistory as $history)
                                                                    @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;
                                                                        }
                                                                    @endphp
                                                                    <li>
                                                                        <div class="timeline-dots1 list-inline-item float-right">
                                                                            <i class="{{ $iconClass }}"></i>
                                                                        </div>
                                                                        <h6 class="float-left mb-1">{{ __('message.'. $history->history_type) }}</h6>
                                                                        <small class="float-right mt-1">{{ dateAgoFormate($history->created_at) }}</small>
                                                                        <div class="d-inline-block w-100">
                                                                            <p>{{ $history->history_message }}</p>
                                                                        </div>
                                                                    </li>
                                                                @endforeach
                                                            </ul>
                                                        </div>
                                                    </div>
                                                </div>
                                            @endif
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</x-master-layout>


