{{-- EXTENDS TEMPLATE --}}
@extends('layouts.app')

{{-- TITLE --}}
@section('title', __('lang.halaman_static'))

{{-- ADDITIONAL STYLE --}}
@push('addons-style')
<link rel="stylesheet" href="{{ url('/') }}/assets/vendor/DataTables/datatables.css" />
@endpush

{{-- ADDITIONAL SCRIPT --}}
@push('addons-script')
<script src="{{ url('/') }}/assets/vendor/DataTables/datatables.js"></script>
@endpush

{{-- CUSTOM STYLESHEET --}}
@push('custom-style')

@endpush

{{-- CUSTOM SCRIPT --}}
@push('custom-script')
<script src="{{ Module::asset('artikel:js/app-static.js') }}"></script>
@endpush

{{-- CONTENT --}}
@section('content')
<section role="main" class="content-body">
    <x-page-layout :breadcrumbs="$bc"></x-page-layout>
    <div class="row">
        <div class="col-md-12">
            <section class="card card-featured card-featured-primary mb-4">
                @if (!$HalamanStatic->isEmpty())
                <header class="card-header header-elements">
                    <h4 class="card-title m-0 me-2">@lang('lang.list_data', ['data' => __('lang.halaman_static')])</h4>
                </header>
                @endif
                <div class="card-body">
                    @if (!$HalamanStatic->isEmpty())
                    <div class="mb-3">
                        <x-forms.button-href class="btn-primary" href="{{ route('artikel.createHalamanStatic') }}" icon="fa fa-plus">{{ __('lang.add_data', ['data' => __('lang.halaman_static')]) }}</x-forms.button-href>
                    </div>
                    <div class="table-responsive">
                        <p class="card-text mb-0">{{ __('messages.list_results') }}</p>
                        <table id="{{ $table }}" class="table table-bordered table-striped mb-0"
                            data-url="{{ route('artikel.datatableHalamanStatic') }}"
                            style="border-collapse:collapse; border-spacing: 0; width: 100%;">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>{{ __('lang.title') }}</th>
                                    <th class="text-center">{{ __('lang.status') }}</th>
                                    <th class="text-center">@lang('lang.date_publish')</th>
                                    <th class="text-center">@lang('lang.date_perubahan')</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td colspan="6" class="dataTables_empty text-center">
                                        {{ __('lang.loading_data_from_server') }}
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    @else
                    <x-empty-state :messages="__('messages.empty_data')" :images="asset('assets/img/drawkit/undraw_web_search_re_efla.svg')">
                        <x-forms.button-href class="btn-primary" href="{{ route('artikel.createHalamanStatic') }}" icon="fa fa-plus">{{ __('lang.add_data', ['data' => __('lang.halaman_static')]) }}</x-forms.button-href>
                    </x-empty-state>
                    @endif
                </div>
            </section>
        </div>
    </div>
</section>
@endsection
