<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<?php init_head(); ?>
<div id="wrapper" class="perfex-saas-screen" role="main" aria-labelledby="companiesHeading">
        <div class="content perfex-saas-container">
                <div class="row">
                        <div class="col-md-12">
                                <div class="perfex-saas-surface perfex-saas-surface--flush">
                                    <div class="perfex-saas-surface__header">
                                        <div>
                                            <h1 id="companiesHeading" class="perfex-saas-title tw-text-2xl tw-font-bold tw-m-0 tw-flex tw-items-center tw-gap-2"><i class="fa fa-university tw-text-primary-600" aria-hidden="true"></i><?php echo _l('perfex_saas_companies'); ?></h1>
                                            <p class="tw-text-sm tw-text-neutral-500 tw-m-0"><?= _l('perfex_saas_new_company'); ?></p>
                                        </div>
                                        <div class="tw-flex tw-gap-2 tw-flex-wrap">
                                        <?php if (has_permission('perfex_saas_companies', '', 'create')) { ?>
                                            <a href="<?php echo admin_url('perfex_saas/companies/create'); ?>" class="btn btn-primary">
                                                <i class="fa-regular fa-plus tw-mr-1"></i>
                                                <?php echo _l('perfex_saas_new_company'); ?>
                                            </a>
                                        <?php } ?>
                                        </div>
                                    </div>
                                    <div class="perfex-saas-surface__body">
                                        <div class="panel_s">
                                            <div class="panel-body panel-table-full">
                        <?php render_datatable([
                            _l('perfex_saas_name'),
                            _l('perfex_saas_clients_list_company'),
                            _l('perfex_saas_company_status'),
                            _l('perfex_saas_package'),
                            _l('perfex_saas_data_location'),
                            _l('perfex_saas_modules'),
                            _l('perfex_saas_date_created'),
                            _l('perfex_saas_last_updated'),
                            _l('perfex_saas_options'),
                        ], 'companies'); ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
            </div>
        </div>
    </div>
</div>
<?php init_tail(); ?>
<script>
"use strict";
$(function() {
    initDataTable('.table-companies', window.location.href, undefined, [5]);
});
</script>
</body>

</html>