<div class="table-responsive">
    <div class="d-flex justify-content-between">
        <h5 class="mb-0">Page Content </h5>
        <a data-bs-toggle="modal" data-bs-target="#commonModal" id="create_page_content" data-id="{{$id}}" class="btn btn-success"><i class="bx bx-plus-circle"></i> Add New</a>
    </div>
    <hr class="mb-2">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Sl No.</th>
                <th>Page Type</th>
                <th>Title</th>
                <th>Priority</th>
                <th class="thbutton"> Status</th>
                <th class="thbutton"> Edit</th>
                <th class="thbutton"> Delete</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if($pageContent->count() > 0)
            @foreach($pageContent as $list)
            <tr>
                <td class="text-center">{{$i++}}</td>
                <td class="text-left">
                        <b>{{$list->content_type}}</b>
                </td>
                <td>
                    @if($list->content_type=="Content Category")
                        {{ $list->getContentCategory->name ?? '' }}
                    @elseif($list->content_type=="Photo Gallery")
                        {{ $list->getGallery->title ?? '' }}
                    @else
                        {{ $list->getVideoGallery->title ?? '' }}
                    @endif
                </td>
                <td class="text-center">
                    {!! $list->priority ?? '' !!}
                </td>
                <td class="text-center">
                    <div class="form-check form-check-inline{{$i}}">
                        <input class="form-check-input{{$i}} btn-lg changeStatusCustom" type="checkbox" id="inlineCheckbox{{$i}}" data-url="{{route('page-content.getPage.content.changestatus')}}" data-id="{{$list->id}}" data-status="{{$list->status=='0' ? '1' : '0'}}" {{ $list->status=='1' ? 'checked' : '0'}}>
                    </div>
                </td>
                <td class="thbutton">
                    <a data-id="{{ $list->id }}" class="btn btn-warning edit edit_page_content" type="button" data-bs-toggle="modal" data-bs-target="#commonModal" id="edit_study_material_types">
                        <i class="bi bi-pencil-square text-white"></i>
                    </a>
                </td>

                <td class="thbutton">
                    <a data-url="{{ route('page-content.getPage.content.delete', $list->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>
                </td>

            </tr>
            @endforeach
            @else
            <tr>
                <td colspan="7">No Data Found</td>
            </tr>
            @endif
        </tbody>

    </table>
</div>
</div>