<?= $this->include('themes/_commonPartialsBs/select2bs5') ?>
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>

<?= $this->section('content');  ?>
<div class="row">
    <div class="col-md-12">

        <div class="card card-info">
            <div class="card-header">
                <h3 class="card-title"><?= lang('ConfigVariables.cardTitle') ?></h3>
            </div><!--//.card-header -->
            <div class="card-body">

                <?= view('themes/_commonPartialsBs/_alertBoxes'); ?>

                <table id="tableConfigVariables" class="table table-striped table-hover" style="width: 100%;">
                    <thead>
                        <tr>
                            <th><?= lang('ConfigVariables.datatable.columns.name') ?></th>
                            <th><?= lang('ConfigVariables.datatable.columns.value') ?></th>
                            <th><?= lang('ConfigVariables.datatable.columns.description') ?></th>
                            <th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
                        </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
            </div><!--//.card-body -->
            <div class="card-footer">

            </div><!--//.card-footer -->
        </div><!--//.card -->
    </div><!--//.col -->
</div><!--//.row -->
<!-- Modal -->
<div class="modal fade" id="modalConfigVariableForm" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel1"><?= lang('ConfigVariables.modal.title') ?></h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form id="formEditConfigVariable">
                    <div class="form-group">
                        <div class="row">
                            <div class="col mb-4">
                                <label for="name" class="form-label"><?= lang('ConfigVariables.form.name') ?></label>
                                <input type="text" id="name" class="form-control" disabled>
                            </div>
                        </div>
                        <div class="row g-4">
                            <div class="col-12 mb-0">
                                <label for="value" class="form-label"><?= lang('ConfigVariables.form.value') ?></label>
                                <input type="number" min=0 id="value" class="form-control">
                            </div>
                            <div class="col-12 mb-0">
                                <label for="description" class="form-label"><?= lang('ConfigVariables.form.description') ?></label>
                                <textarea type="text"  rows="4" cols="10" id="description" class="form-control"></textarea>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-label-secondary" data-bs-dismiss="modal"><?= lang('App.global_come_back') ?></button>
                <button type="button" class="btn btn-primary btn-update-variable"><?= lang('App.global_save') ?></button>
            </div>
        </div>
    </div>
</div>
<?= $this->endSection() ?>
<?= $this->section("additionalExternalJs") ?>
<script type="module" src="<?= site_url('assets/js/safekat/pages/configuracion/variables.js') ?>"></script>
<?= $this->endSection() ?>