<x-app-layout>
    <x-slot name="header">
        <div class="d-flex align-items-center justify-content-between">
            <div>
                <h2 class="h4 mb-0">Disconnect By Due Customer</h2>
            </div>
        </div>
    </x-slot>

    <div class="card shadow-sm border-0">
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered table-hover" id="disconnectDueTable" style="width:100%">
                    <thead>
                        <tr>
                            <th>Customer ID</th>
                            <th>Customer Name</th>
                            <th>Router</th>
                            <th>Router IP</th>
                            <th>Identifier</th>
                            <th>Package</th>
                            <th>Status</th>
                            <th>Reason</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>

    @push('scripts')
        <script>
            document.addEventListener('DOMContentLoaded', function () {
                $('#disconnectDueTable').DataTable({
                    processing: true,
                    serverSide: true,
                    responsive: true,
                    ajax: '{!! route('admin.mikrotik.disconnect-due.data') !!}',
                    columns: [
                        { data: 'customer_code', name: 'customer_code' },
                        { data: 'customer_name', name: 'customer_name' },
                        { data: 'router_name', name: 'router_name' },
                        { data: 'router_ip', name: 'router_ip' },
                        { data: 'identifier', name: 'identifier' },
                        { data: 'package', name: 'package' },
                        { data: 'status', name: 'status' },
                        { data: 'reason', name: 'reason' },
                    ]
                });
            });
        </script>
    @endpush
</x-app-layout>
