 <div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Sl No</th>
                <th> Name</th>
                <th>Email</th>
                <th>Phone No</th>
                <th>Designation</th>
                <th>Gender</th>
                <th>City</th>
                <th>Date Of Birth</th>
                <th>Role</th>
                @if(in_array('employee-edit', $authRolePermissions))
                {{-- @if(auth()->user()->can('employee-edit')) --}}
                <th class="thbutton">Edit</th>
                @endif
                @if(in_array('employee-delete', $authRolePermissions))
                <th class="thbutton">Delete</th>
                @endif
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td class="text-center">{{$data->firstItem() + $key}}</td>
                        <td>{{$list->name}}</td>
                        <td>{{$list->email}}</td>
                        <td>{{$list->phone_no}}</td>
                        <td>{{$list->getDesignation->name}}</td>
                        <td>{{$list->getGender->name}}</td>
                        <td>{{$list->getCity->name}}</td>
                        <td>{{ FormatedDate($list->date_of_birth) }}</td>
                        <td>{{$list->getRole->role_in_project?? ''}}</td>
                        @if(in_array('employee-edit', $authRolePermissions))
                        <td>
                            <a href="{{route('employee.edit',$list->id)}}" class="btn btn-outline-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Edit">
                                <i class="bi bi-pencil-square"></i>
                            </a>
                        </td>
                        @endif
                        @if(in_array('employee-delete', $authRolePermissions))
                        <td>
                            <a data-url="{{route('employee.destroy')}}" data-id="{{$list->id}}" class="btn btn-danger deleteDataCustom" href="#" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                                <i class="bi bi-trash text-white"></i>
                            </a>
                        </td>
                        @endif
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
            <tr>
                <td colspan="10">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="mt-2 row">
    <div class="col-lg-8 col-md-8 col-8 float-start">
        {!! $data->onEachSide(0)->render('enquiries.pagination') !!}
    </div>
    <div class="col-lg-2 col-md-2 dataTables_length" id="example_length" style="text-align: right;">
            <i class="bi bi-funnel" style=" top: 11px;left: 20px;"></i>
            <select class="form-select sorting sorting-box" id="" name="example_length" aria-controls="example" style="padding-left: 30px;">
                <option value="10">Show: 10</option>
                <option value="30">Show: 30</option>
                <option value="50">Show: 50</option>
            </select>
    </div>

    <div class="float-end col-lg-2 col-md-2" style="text-align: right; width:auto;">
    <div class="btn-group">
        <a class="btn btn-outline-primary" href="{!! route('employee.import.create') !!}"><i class="bi bi-cloud-download"></i> Employee Import</a>
    </div>
</div>
</nav>

</div>
