@extends('web.layouts.layout')
@section('content')

    <main>


        <!-- ---------- Start breadcrumb ----------- -->
    @include('web.pages.components.header.header')


    <!-- ---------- profile page ----------- -->
        <section class="profile-pg pb-4">
            <div class="container">
                <div class="row">
                    <div class="col-lg-3">
                        @include('web.pages.profile.layout.sidebar')
                    </div>

                    <div class="col-lg-9">
                        <div class="refund-tab">
                            <div class="line-title mb-4"> <h5 class="bg-white pe-3"> <i class="far fa-arrows-repeat small me-2"></i> الارجاع </h5> </div>
                            <div class="refund-cards gray-box p-3 bg-light1 rounded-3">
                                @if(count($refunds))
                                    @foreach($refunds as $row)
                                        <a href="{{route('web.refund.show',$row->id)}}" class="item m-1">
                                            <div class="row gx-0">
                                                <div class="col-lg-2">
                                                    <div class="img">
                                                        <img src="{{asset($row->orderProduct->product->image)}}" alt="" class="img-cover">
                                                    </div>
                                                </div>
                                                <div class="col-lg-10">
                                                    <div class="info">
                                                        <p> رقم طلب الإرجاع  <strong> {{$row->uuid}} </strong> </p>
                                                        <span class="cr-blue mt-2 mb-1 d-block"> مطلوب </span>
                                                        <small class="opacity-50"> {{__('web.refund_statuses.'.$row->status)}}</small>
                                                    </div>
                                                </div>
                                            </div>
                                            <span class="float-arrow"> <i class="fal fa-chevron-left"></i> </span>
                                        </a>
                                    @endforeach
                                @else
                                    @include('web.pages.components.not_found_profile',['message'=>__('web.not_found_refund')])
                                @endif
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </section>


        @include('web.layouts.footer_banner')



    </main>

    @include('web.pages.components.rate_model')

@endsection
@section('inject_js')
    <script>
        let url_calculate = "{{route('web.order.fetch')}}"
    </script>
    <script src="{{url('')}}/assets/web/js/custom/order.js"></script>
@endsection
