<div class="tab_wrapper loc_tab">
    <h2 class="sec_title text-uppercase color-primary fw-bold text-center mb-5">
        {{ __('web.addresses') }}
        <img src="{{url('')}}/assets/web/images/title_line.svg" class="d-block m-auto" alt=""/>
    </h2>
    @if(count($locations) == 0)
        <div class="alert alert-danger py-4 text-center my-5" role="alert">
            {{__('web.not_exist_address')}}
        </div>
    @else
        @foreach($locations as $key=>$row)
            <div class="loc_card col-md-11">
                <div class="heading in-flex">
                    <div class="inFlex">
                        <span class="icon-outer">
                            <i class="fas fa-map-marker-alt"></i>
                        </span>
                        <h5 class="title mb-0"><b> {{$key+1}} {{__('web.address')}}  </b></h5>
                    </div>
                    <div class="butns inFlex justify-content-end">
                        <button onclick="locationForm(this)" target-id="{{route('profile.location.edit',$row->id)}}" class="card_butn edit" data-bs-toggle="modal" data-bs-target="#editLocModal">{{ __('web.edit') }}</button>
                        <button onclick="deleteLocation(this)" target-id="{{route('profile.location.delete',$row->id)}}" class="card_butn delete">{{ __('web.delete') }}</button>
                    </div>
                </div>
                <div class="card-body inFlex">
                    <span class="icon-outer">
                        <img src="{{url('')}}/assets/web/images/icons/home.png" alt="" class="icon"/>
                    </span>
                    <div class="content">
                        <h6 class="country"> {{$row->country->descriptions()->name}} - {{$row->city->descriptions()->name}}</h6>
                        <p class="color-gray2 mb-0"> {{$row->address}}  </p>
                    </div>
                </div>
            </div>
        @endforeach
    @endif
    <button class="butn primary_butn m-auto mt-5" type="button" data-bs-toggle="modal" onclick="locationForm(this)" target-id="{{route('profile.location.create')}}" data-bs-target="#editLocModal"> {{ __('web.add_new_location') }}     </button>
</div>
