@extends('layouts.admin')
@section('content')
<input type="hidden" id="headerdata" value="{{ __('Widgets') }}">
<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">Widgets</li></ul></div>
    <div class="col-md-12"><div class="page-header-title"><h2 class="mb-0">{{ __('Widgets') }}</h2></div></div>
</div></div></div>

<div class="row mb-3"><div class="col-lg-12 text-end"><a class="btn btn-primary text-white" data-href="{{route('widget.create')}}" id="add-data"><i class="ti ti-plus me-1"></i>{{ __('Add New Widget') }}</a></div></div>

<div class="card tbl-card">
    <div class="card-header"><h5>{{ __('Widgets') }}</h5></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>{{ __('Title') }}</th><th>{{ __('Type') }}</th><th>{{ __('Language') }}</th><th>{{ __('Status') }}</th><th>{{ __('Options') }}</th></tr></thead>
            </table>
        </div>
    </div>
</div>
<div class="modal fade" id="modal1" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-header"><h5 class="modal-title"></h5><button type="button" class="btn-close" data-bs-dismiss="modal"></button></div><div class="modal-body"></div><div class="modal-footer"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ __('Close') }}</button></div></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 Widget.') }}</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('widget.datatables') }}',
        columns: [{ data: 'title', name: 'title' },{ data: 'type', name: 'type' },{ data: 'language_id', name: 'language_id' },{ data: 'status', name: 'status' },{ data: 'action', searchable: false, orderable: false }],
        drawCallback: function(settings){ $('.select').niceSelect(); }
    });
</script>
@endsection
