<div class="card style_table shadow-none" style="margin-bottom:0.8rem;">
    <form class="g-3 ajaxformfileupload" action="{{route('bulktostudent')}}" method="post" enctype='multipart/form-data'>
        <div class="card-header d-flex align-items-center justify-content-between">
            <h6 class="mb-0">Total Item in Cart <i class="bi bi-cart"></i> ({!! isset($studentTemData) ? count($studentTemData) : '0' !!})</h6>
            <button type="submit" class="btn btn-outline-primary" id="checkout"><i class="bx bx-plus"></i> Submit Temp To Final Student</button>
        </div>
        <div class="card-body pb-0">
            <div class="table-responsive">
                <table class="table table-bordered align-middle" style="width:100%">
                    <thead class="table-light">
                        <tr>
                            <th class="thbutton"><input type="checkbox" class="checkbox" id="selectAll"> All</th>
                            </th>
                            <th>Admission NO</th>
                            <th>Student Name</th>
                            <th>Caste</th>
                            <th>Mobile No</th>
                            <th>AMD</th>
                            <th>Messages</th>
                            <th class="thbutton">Status</th>
                            <th class="thbutton">Edit</th>
                            <th class="thbutton">Delete</th>
                        </tr>
                    </thead>
                    <tbody>
                        @php $i=1;@endphp
                        @if(count($studentTemData)>0)
                        @foreach($studentTemData as $key=>$list)
                        <tr>
                            <td class="text-center"><input type="checkbox" class="checkbox" name="bulk_id[]" value="{{$list->id}}"></td>
                            <td>{{$list->admission_no}}</td>
                            <td>{{$list->student_name??''}}</td>
                            <td>{{$list->caste??''}}</td>
                            <td>{{$list->mobile??''}}</td>
                            <td>{{$list->date_of_adminssion??''}}</td>
                            <td>@if(trim($list->error_message))
                                 @php echo wordwrap($list->error_message,32,"<br>\n") @endphp
                                 @endif
                            </td>
                            <td>@if($list->status==0)
                                <span class="text-danger">Error</span>
                                @elseif($list->status==1)
                                <span class="text-info">Pending</span>
                                @endif
                            </td>
                            <td class="text-center">
                                <a href="{{route('student-bulk-list-edit',$list->id)}}" class="btn btn-outline-secondary edit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Edit">
                                    <i class="bi bi-pencil-square"></i>
                                </a>
                            </td>
                            <td class="text-center">
                                <a data-url="{{route('student-bulk-list.temp.destroy')}}" data-mainid="{{$list->id}}" data-id="{{$list->id}}" class="btn btn-danger deleteDataCustom" href="#" data-bs-toggle="tooltip" data-bs-placement="bottom" aria-label="Delete">
                                    <i class="bi bi-trash text-white"></i>
                                </a>
                            </td>
                        </tr>
                        @php $i++; @endphp
                        @endforeach
                        @else
                        <tr>
                            <td colspan="9">No Data Found</td>
                        </tr>
                        @endif
                    </tbody>
                </table>
            </div>
            <nav class="row align-items-center mt-3">
                <div class="col-md-6">
                    {!! $studentTemData->onEachSide(1)->render('students.pagination') !!}
                </div>
            </nav>
        </div>
    </form>
</div>