<div class="d-flex justify-content-between align-items-center mb-3">
    <h4><?= lang('facilities.types') ?></h4>
    <a href="/facilities/types/create" class="btn btn-primary btn-sm"><i class="fas fa-plus me-1"></i><?= lang('facilities.create_type') ?></a>
</div>
<div class="card">
    <div class="card-body">
        <table id="types-table" class="table table-striped table-hover w-100"
               data-url="/api/facilities/types/list"
               data-columns='<?= json_encode([
                   ["data"=>"id","title"=>"#","width"=>"50px"],
                   ["data"=>"code","title"=>"Code"],
                   ["data"=>"name_en","title"=>"Name (EN)"],
                   ["data"=>"name_ar","title"=>"Name (AR)"],
                   ["data"=>"bookable","title"=>"Bookable","className"=>"text-center"],
                   ["data"=>"active","title"=>"Active"],
                   ["data"=>"facilities","title"=>"Facilities"],
                   ["data"=>"actions","title"=>"Actions","orderable"=>false,"searchable"=>false],
               ]) ?>'>
            <thead><tr><th>#</th><th>Code</th><th>Name (EN)</th><th>Name (AR)</th><th>Bookable</th><th>Active</th><th>Facilities</th><th>Actions</th></tr></thead>
        </table>
    </div>
</div>
<?php $__view->push('scripts') ?>
<script>document.addEventListener('DOMContentLoaded', function() { DataTableHelper.init('types-table'); });</script>
<?php $__view->endPush() ?>