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

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


        <section class="checkout_pg cart_pg section">
            <div class="container">
                <div class="">
                    <form method="post" action="{{$action}}" onsubmit="formAction(this)">
                        @CSRF
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="sec_head mb-5 ">
                                    <h2 class="fs-1 fw-bold color-primary">     {{__('web.way_pay')}}   </h2>
                                </div>
                                <div class="box">
                                    <div class="pay-options">
                                        <div class="row justify-content-center">
                                            @if(count($ways))
                                                @foreach($ways as $row)
                                                    <div class="col-6">
                                                        <div class="form-check mb-4">
                                                            <input class="form-check-input" type="radio" name="way_id"  id="payType{{$row->id}}" value="{{$row->id}}" >
                                                            <label class="form-check-label" for="payType{{$row->id}}">
                                                                <img src="{{asset($row->image)}}" class="sm_img" alt="">
                                                                {{$row->title}}
                                                            </label>
                                                        </div>
                                                    </div>
                                                @endforeach
                                            @else
                                                @include('web.pages.components.not_found',['message'=>__('web.not_found_way_pay')])
                                            @endif

                                        </div>


                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="sec_head mb-5 ">
                                    <h2 class="fs-1 fw-bold color-primary">    {{__('web.shipping_way')}}     </h2>
                                </div>
                                <div class="box">
                                    <div class="pay-options">
                                        <div class="row justify-content-center">
                                            @if(count($shippings))
                                                @foreach($shippings as $row)
                                                    <div class="col-lg-6 col-6">
                                                        <div class="form-check mb-4">
                                                            <input class="form-check-input" type="radio" name="shipping_id"  id="shippingType{{$row->id}}" value="{{$row->id}}">
                                                            <label class="form-check-label" for="shippingType{{$row->id}}">
                                                                <img src="{{asset($row->image)}}" class="sm_img" alt="">
                                                                {{$row->title}}
                                                            </label>
                                                        </div>
                                                    </div>
                                                @endforeach
                                            @else
                                                @include('web.pages.components.not_found',['message'=>__('web.not_found_shipping')])
                                            @endif
                                        </div>


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

                        <div class="butns mt-5 d-flex justify-content-center align-items-center">
                            <a href="{{route('web.checkout.address')}}" class="butn gray_butn color-primary">
                                <i class="fa-solid fa-angle-right ms-0 me-2"></i> {{__('web.back')}}
                            </a>
                            <button type="submit" class="butn primary_butn ms-4">
                                {{__('web.ordering')}}<i class="fa-solid fa-angle-left"></i>
                            </button>
                        </div>

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



    </main>

@endsection

@section('inject_js')
@endsection
