<?= $this->extend('Modules\Dashboard\Views\dashboard\index'); ?>

<?= $this->section('content');?>
  <div class="page-title">
    <h4>Counties</h4>
    <h6><a href="<?= base_url('dashboard');?>">Home</a> / <?= esc($bcrumb) ?></h6>
  </div>
  <div>
    <?php if(session()->getTempdata('error')):?>
    <div class="alert alert-danger">  <?= session()->getTempdata('error');?></div>
    <?php endif;?>
      <?php if(session()->getTempdata('success')):?>
      <div class="alert alert-success">  <?= session()->getTempdata('success');?></div>
      <?php endif;?>
			<?php if(session()->getTempdata('warning')):?>
      <div class="alert alert-warning">  <?= session()->getTempdata('warning');?></div>
      <?php endif;?> 					
  </div>

<div class="container-xxl p-0">
  <div class="row">
    <div class="col-lg-12 p-0"> 
        <div class="card">
            <div class="card-body">
            <p class="card-title"><i class="bi bi-three-dots"></i>
                <button onclick="add_county()" style="margin-top: -10px;" class="btn btn-sm btn-primary btn-rounded btn-icon float-end">Add New</button>
            </p>
                <div id='general-error'></div>
            <div class="table-responsive">
                <table id="county-list" class="table table-hover expandable-table w-100">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>Name</th>
                        <th>District</th>
                        <th>Sub Counties</th>
                        <th>Options</th>
                    </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
                </div>
            </div>
        </div>
    </div>
</div>

<?= view('Modules\AdministrativeUnits\Views\county\modals\county_modal') ?>
<?= view('Modules\AdministrativeUnits\Views\county\modals\viewsubcounties_modal') ?>

<script src="<?=base_url('assets/js/base.js')?>"></script>
<script src="<?=base_url('assets/js/Modules/administrativeunits/counties.js')?>"></script>
<?php echo $this->endSection() ?>

