<div class="d-flex justify-content-between align-items-center mb-4">
    <h4 class="mb-0"><i class="fas fa-door-open me-2"></i><?= lang('cards.access_points') ?></h4>
    <a href="/access-points/create" class="btn btn-primary"><i class="fas fa-plus me-1"></i><?= lang('common.create') ?></a>
</div>
<div class="card"><div class="card-body">
    <table id="ap-table" class="table table-striped w-100" data-url="/access-points/datatable"
           data-columns='[{"data":"id","title":"#","width":"50px"},{"data":"point_code","title":"Code"},{"data":"name_en","title":"Name"},{"data":"location","title":"Location"},{"data":"point_type","title":"Type"},{"data":"is_active","title":"Active","render":"renderBool"},{"data":"id","title":"Actions","orderable":false,"searchable":false,"render":"renderAPActions"}]'>
    </table>
</div></div>
<?php $__view->push('scripts') ?>
<script>
function renderBool(d){return d==1?'<i class="fas fa-check text-success"></i>':'<i class="fas fa-times text-danger"></i>';}
function renderAPActions(d){return '<a href="/access-points/'+d+'/edit" class="btn btn-sm btn-warning"><i class="fas fa-edit"></i></a>';}
document.addEventListener('DOMContentLoaded',function(){DataTableHelper.init('ap-table');});
</script>
<?php $__view->endPush() ?>