<div class="table-responsive">
  <table class="table table-bordered align-middle" style="width:100%">
      <thead class="table-light">
          <tr>
              <th>Sl No</th>
              <th>Country</th>
              <th>Document Type</th>
              <th>Document Code</th>
              <th class="thbutton">Status</th>
              @if(in_array('document-types-edit', $authRolePermissions))
              <th class="thbutton">Edit</th>
              @endif
              @if(in_array('document-types-delete', $authRolePermissions))
              <th class="thbutton">Delete</th>
              @endif
          </tr>
      </thead>
      <tbody>
        @php $i=1;@endphp
        @if(count($CompanyLicenceType)>0)
        @foreach($CompanyLicenceType as $key => $list)
        <tr>
            <td>{{$CompanyLicenceType->firstItem() + $key}}</td>
            <td style="white-space:pre-wrap; word-wrap:break-word">{{ $list->country }}</td>
                <td>{{$list->license_type_name}}</td>
                <td>{{$list->license_code}}</td>
                <td align="center">
                    <div class="form-check form-check-inline{{$i}}">
                        <input class="form-check-input{{$i}} btn-lg changeStatus" type="checkbox" id="inlineCheckbox{{$i}}" data-url="{{route('license.changestatus')}}" data-id="{{$list->id}}" 
                        data-status="@if($list->license_status=='0'){{'1'}}@elseif($list->license_status=='1'){{'0'}}@endif" 
                        @if($list->license_status=='1'){{'checked'}}@elseif($list->license_status=='0'){{''}}@endif>
                    </div>
                </td>
                @if(in_array('document-types-edit', $authRolePermissions))
                <td> 
                    <button data-id="{{ $list->id }}" class="btn btn-warning edit" data-bs-toggle="modal" data-bs-target="#commonModal" title="Edit">
                        <i class="bi bi-pencil-square text-white"></i>
                    </button>
                </td>
                @endif
                @if(in_array('document-types-delete', $authRolePermissions))
                <td>
                    <a href="#"  data-url="{{route('document-types.destroy')}}" data-id="{{$list->id}}" class="btn btn-danger deleteData" 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="8">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="float-start mt-2">
    <ul class="pagination">
        {!! $CompanyLicenceType->onEachSide(1)->render('document-types.pagination') !!}
    </ul>
</nav>
</div>

