<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 >Comment</th>
                <th class="thbutton"> Edit</th>
                <th class="thbutton"> Delete</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if($data->count() > 0)
                @foreach($data as $list)
                <tr>
                    <td class="text-center">{{$i++}}</td>
                    <td class="text-left">{{$list->comment}} <span class="text-primary">{!! !empty($list->tagged_user) ? '@'.$list->tagged_user : '' !!}</span><br><span class="badge bg-info">{{$list->name}}</span> | {!! formatedDate($list->created_at) !!}</td>
                    <td class="thbutton">
                        <a data-id="{{ $list->id }}" class="btn btn-warning edit edit_comments" type="button" id="edit_comments">
                            <i class="bi bi-pencil-square text-white"></i>
                        </a>
                    </td>

                    <td class="thbutton">
                        <a data-url="{{ route('task-comments.destroy') }}" data-id="{{ $list->id }}" class="btn btn-danger deleteCommentData" 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="10">No Data Found</td>
                </tr>
            @endif
        </tbody>
    </table>
</div>
</div>
