<div class="d-flex justify-content-between align-items-center mb-4">
    <h4 class="mb-0"><i class="fas fa-layer-group me-2"></i><?= lang('members.membership_types') ?></h4>
    <?php if (auth_can('members.create')): ?>
    <a href="/membership-types/create" class="btn btn-primary"><i class="fas fa-plus me-1"></i><?= lang('common.create') ?></a>
    <?php endif; ?>
</div>
<div class="card"><div class="card-body">
    <table id="types-table" class="table table-striped w-100"
           data-url="/api/membership-types/datatable"
           data-columns='[{"data":"type_code","title":"Code"},{"data":"name_en","title":"Name (EN)"},{"data":"name_ar","title":"Name (AR)"},{"data":"category","title":"Category"},{"data":"is_family","title":"Family","orderable":false},{"data":"max_dependents","title":"Max Deps"},{"data":"active_count","title":"Members"},{"data":"is_active","title":"Status"},{"data":"actions","title":"","orderable":false}]'>
        <thead><tr><th>Code</th><th>Name (EN)</th><th>Name (AR)</th><th>Category</th><th>Family</th><th>Max Deps</th><th>Members</th><th>Status</th><th></th></tr></thead>
    </table>
</div></div>
<?php $__view->push('scripts') ?><script>DataTableHelper.init('types-table');</script><?php $__view->endPush() ?>