<!-- Basic table -->
<section id="responsive-datatable">
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-header border-bottom">
                    <h4 class="card-title">{{__('lang.admin_about_us_list')}}</h4>
                    <h6 style="float: right;"> <?php if ($data->firstItem() != null) {?> {{__('lang.admin_showing')}} {{ $data->firstItem() }}-{{ $data->lastItem() }} {{__('lang.admin_of')}} {{ $data->total() }} <?php }?></h6>
                </div>
                <div class="card-datatable">
                    <table class="dt-responsive table">
                        <thead>
                            <tr>
                                <th>{{__('lang.admin_image')}}</th>
                                <th>{{__('lang.admin_type')}}</th>
                                <th>{{__('lang.admin_name')}}</th>
                                <th>{{__('lang.admin_table_action')}}</th>
                            </tr>
                        </thead>
                        <tbody>
                            @if(count($data) > 0)
                            @foreach($data as $res)
                            <tr>
                                <td aria-colindex="2" role="cell" class=""><span
                                        class="b-avatar mr-1 badge-secondary rounded-circle"><span class="b-avatar-img">
                                            @if($res->image!='')
                                            <img src="{{asset('/app-assets/images/partners/'.$res->image)}}"
                                                width="100px"
                                                onerror="this.src='{{asset('app-assets/images/no-image.png')}}';">
                                            @else
                                            <img src="{{asset('/app-assets/images/no-image.png')}}">
                                            @endif
                                        </span></span></td>
                                <td style="text-transform: capitalize">{{ isset($res->type)?$res->type:'--' }}</td>
                                <td>{{ isset($res->name)?$res->name:'--' }}</td>
                                <td>
                                    <div class="dropdown">
                                        <button type="button" class="btn btn-sm dropdown-toggle hide-arrow" data-bs-toggle="dropdown">
                                            <i data-feather="more-vertical"></i>
                                        </button>
                                        <div class="dropdown-menu">
                                            <a class="dropdown-item" href="{{ route('about_us.edit', $res->id) }}">
                                                <i data-feather="edit-2" class="me-50"></i>
                                                <span>{{__('lang.admin_button_edit')}}</span>
                                            </a>
                                            <a class="dropdown-item" href="{{ url('admin/about_us/translation/'.$res->id) }}">
                                                <i data-feather="type" class="me-50"></i>
                                                <span>{{__('lang.admin_button_translation')}}</span>
                                            </a>
                                            {!! Form::open(['route' => ['about_us.destroy', $res->id], 'method' => 'delete']) !!}
                                            {!! Form::button('<i data-feather="trash" class="me-50"></i><span>Delete</span>', [
                                            'data-toggle' => 'tooltip',
                                            'data-placement' => 'bottom',
                                            'title' => 'Delete',
                                            'type' => 'submit',
                                            'class' => 'dropdown-item',
                                            'onclick' => "return confirm('Are you sure?')",
                                            'style' => "width:100%;"
                                            ]) !!}
                                            {!! Form::close() !!}
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            @endforeach
                            @else
                            <tr>
                                <td colspan="4" class="recordnotfound"><span>{{__('lang.admin_message_no_result_found')}}</span></td>
                            </tr>
                            @endif
                        </tbody>
                    </table>
                </div>
                <div class="card-footer">
                    <div class="pagination" style="float: right;">
                        {{$data->withQueryString()->links('pagination::bootstrap-4')}}
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>