<!-- Begin Page Content -->
<div class="container-fluid">
    <div class="row column_title">
        <div class="col-md-12">
            <div class="page_title">
                <h2>Admin Panel Users</h2>
            </div>
        </div>
    </div>

    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <!-- <h6 class="m-0 font-weight-bold text-primary">DataTables Example</h6> -->
            <button type="button" onclick="location.href='<?= base_url() . 'admin/addAdmin' ?>'" class="btn btn-primary">Add Admin</button>
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered" id="songTable" width="100%" cellspacing="0">
                    <thead class="thead-dark">
                        <tr>
                            <th>Name</th>

                            <th>Email</th>
                            <th>Permissions</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        if (!empty($admins)) {
                            $count = 1;
                            foreach ($admins as $id => $customerlists) {
                                if($customerlists['permissions'] == "All" && $customerlists['isMaster'] === true) continue;
                        ?>
                        <tr>
                            <td> <?php echo output($customerlists['name']); ?></td>
                            <td><?php echo output($customerlists['email']); ?></td>
                            <td><?php echo output($customerlists['permissions']); ?></td>



                            <td>
                                <!-- <?php if ($customerlists["isActive"] == false) {
                                                ?>
                                            <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>customer/unSuspendCustomer/<?php echo output($id); ?>">
                                                <button class="btn btn-success btn-block mt-2">Activate</button>
                                            </a>
                                        <?php
                                                } else {
                                        ?>
                                            <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>customer/suspendCustomer/<?php echo output($id); ?>">
                                                <button class="btn btn-warning btn-block mt-2">Suspend</button>
                                            </a>
                                        <?php
                                                } ?> -->
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>admin/editAdmin/<?php echo output($id); ?>">
                                    <button class="btn btn-info btn-block mt-2">Edit</button>
                                </a>
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>admin/deleteAdmin/<?php echo output($id); ?>">
                                    <button class="btn btn-danger btn-block mt-2">Delete</button>
                                </a>
                            </td>
                        </tr>
                        <?php }
                        } ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>
<!-- /.container-fluid -->