<div class="table-responsive">
    <table class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr align="center">
                <th class="thbutton">Sl No</th>
                <th>Return No</th>
                <th>Member Name</th>
                <th>Qnt</th>
                <th>Return Date</th>
                <th class="thbutton" align="center">Print</th>
                <th class="thbutton" align="center">Edit</th>
                <th class="thbutton" align="center">Delete</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($BookReturn)>0)
            @foreach($BookReturn as $key=> $row)
            @php $detailsbooks=json_decode($row->details) @endphp
            <tr align="center">
                <td>{{$BookReturn->firstItem() + $key}}</td>
                <td>@if(isset($row->return_no)){{$row->return_no}}@endif</td>
                <td>
                    <a href="{{route('book-return.show',$row->return_no)}}">@if(isset($row->getIssuedetails->getisseuBook->getStudentDetails->name)){{$row->getIssuedetails->getisseuBook->getStudentDetails->name}}@endif</a>
                </td>

                <td>@if(isset($row->sumreturn_qty)){{$row->sumreturn_qty}}@endif</td>
                <td>@if(isset($row->return_date)){{$row->return_date}}@endif</td>
                <td align="center">
                @if(in_array('book-return-print', $authRolePermissions))
                    <a href="{{route('book-returns.print',$row->return_no)}}" class="btn btn-success" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Print">
                        <i class="bi bi-printer text-white"></i>
                    </a>
                @endif
                </td>
                <td align="center">
                    @if(in_array('book-return-edit', $authRolePermissions))
                    <a href="{{route('book-return.edit',$row->return_no)}}" class="btn btn-outline-secondary edit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Edit">
                        <i class="bi bi-pencil-square"></i>
                    </a>
                @endif
                </td>
                <td align="center">
                    @if(in_array('book-return-delete', $authRolePermissions))
                    <a data-url="{{route('book-return.delete')}}" data-id="{{$row->id}}" class="btn btn-danger deleteDataCustom" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                        <i class="bi bi-trash text-white"></i>
                    </a>
                @endif
                </td>

            </tr>
            @php $i++; @endphp
            @endforeach
            @else
            <tr>
                <td colspan="10">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<div class="table-responsive">
    <nav class="float-start mt-2">
        <ul class="pagination">
            {!! $BookReturn->onEachSide(1)->render('library.book-return.pagination') !!}
        </ul>
    </nav>
</div>
</div>