@extends('layouts.admin')
@section('content')
<input type="hidden" id="headerdata" value="{{ __('Breaking News') }}">
<div class="page-header"><div class="page-block"><div class="row align-items-center">
    <div class="col-md-12"><ul class="breadcrumb"><li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">হোম</a></li><li class="breadcrumb-item"><a href="javascript: void(0)">কন্টেন্ট</a></li><li class="breadcrumb-item" aria-current="page">Breaking</li></ul></div>
    <div class="col-md-12"><div class="page-header-title"><h2 class="mb-0">{{ __('Breaking News') }}</h2></div></div>
</div></div></div>

<div class="card tbl-card">
    <div class="card-header"><h5>{{ __('Breaking News') }}</h5></div>

    <!-- Bulk Actions Row -->
    <div class="selectPost px-3 py-2 bg-light border-bottom" style="display:none;">
        <div class="d-flex flex-wrap gap-2">
            <button class="btn btn-sm btn-danger delete" data-bs-toggle="modal" data-bs-target="#confirm-delete-option"><i class="ti ti-trash"></i> {{__('Delete Selected')}}</button>
        </div>
    </div>

    <div class="card-body">
        @include('includes.admin.form-success')
        <div class="table-responsive">
            <table id="geniustable" class="table table-hover table-borderless mb-0" cellspacing="0" width="100%">
                <thead><tr><th><input type="checkbox" class="form-check-input m-0 p-0" id="headercheck"></th><th>{{ __('Title') }}</th><th>{{ __('Status') }}</th><th>{{ __('Options') }}</th></tr></thead>
            </table>
        </div>
    </div>
</div>
<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header d-block text-center"><h4 class="modal-title d-inline-block">{{ __('Confirm Delete') }}</h4><button type="button" class="btn-close float-end" data-bs-dismiss="modal"></button></div><div class="modal-body"><p class="text-center">{{ __('You are about to delete this Breaking News.') }}</p></div><div class="modal-footer justify-content-center"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ __('Cancel') }}</button><a class="btn btn-danger btn-ok">{{ __('Delete') }}</a></div></div></div></div>
@endsection
@section('scripts')
<script type="text/javascript">
    var table = $('#geniustable').DataTable({
        ordering: false, serverSide: true,
        ajax: '{{ route('breaking.datatables') }}',
        columns: [{data:'checkbox',searchable:false,orderable:false},{data:'title',name:'title'},{data:'status',name:'status'},{data:'action',searchable:false,orderable:false}],
        drawCallback: function(settings){ $('.select').niceSelect(); }
    });
</script>
@endsection
