<?= $this->extend('layout/template') ?>

<?= $this->section('content') ?>

<div class="container-fluid">

    <div class="card shadow-sm">

        <div class="card-header bg-primary text-white">

            <h4 class="mb-0">
                <i class="fas fa-cog"></i>
                Pengaturan
            </h4>

        </div>


        <div class="card-body p-0">


            <!-- Informasi Sekolah -->
            <a href="<?= base_url('pengaturan/sekolah') ?>" 
               class="setting-item">

                <div class="icon-box bg-primary">
                    <i class="fas fa-school"></i>
                </div>

                <div class="setting-text">

                    <h6>
                        Informasi Sekolah
                    </h6>

                    <small>
                        Nama sekolah, perpustakaan, logo, alamat dan kontak
                    </small>

                </div>

                <i class="fas fa-chevron-right arrow"></i>

            </a>



            <!-- Akun -->
            <a href="<?= base_url('pengaturan/akun') ?>" 
               class="setting-item">

                <div class="icon-box bg-success">
                    <i class="fas fa-user-cog"></i>
                </div>


                <div class="setting-text">

                    <h6>
                        Akun
                    </h6>

                    <small>
                        Profil admin dan ubah password
                    </small>

                </div>


                <i class="fas fa-chevron-right arrow"></i>

            </a>




            <!-- Peminjaman -->
            <a href="<?= base_url('pengaturan/peminjaman') ?>" 
               class="setting-item">


                <div class="icon-box bg-warning">
                    <i class="fas fa-book"></i>
                </div>


                <div class="setting-text">

                    <h6>
                        Aturan Peminjaman
                    </h6>

                    <small>
                        Lama pinjam, denda, maksimal buku
                    </small>

                </div>


                <i class="fas fa-chevron-right arrow"></i>


            </a>




            <!-- Cetak -->
            <a href="<?= base_url('pengaturan/cetak') ?>" 
               class="setting-item">


                <div class="icon-box bg-danger">
                    <i class="fas fa-print"></i>
                </div>


                <div class="setting-text">

                    <h6>
                        Pengaturan Cetak
                    </h6>

                    <small>
                        Ukuran kertas dan footer laporan
                    </small>

                </div>


                <i class="fas fa-chevron-right arrow"></i>


            </a>




            <!-- Backup -->
            <a href="<?= base_url('pengaturan/backup') ?>" 
               class="setting-item">


                <div class="icon-box bg-dark">
                    <i class="fas fa-database"></i>
                </div>


                <div class="setting-text">

                    <h6>
                        Backup Database
                    </h6>

                    <small>
                        Backup dan restore data aplikasi
                    </small>

                </div>


                <i class="fas fa-chevron-right arrow"></i>


            </a>


        </div>

    </div>

</div>



<style>

.setting-item{

    display:flex;
    align-items:center;
    padding:18px 20px;
    border-bottom:1px solid #eee;
    text-decoration:none!important;
    color:#333;
    transition:.2s;

}


.setting-item:hover{

    background:#f8f9fa;

}



.icon-box{

    width:45px;
    height:45px;
    border-radius:50%;
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-right:15px;

}



.setting-text{

    flex:1;

}



.setting-text h6{

    margin:0;
    font-weight:600;

}


.setting-text small{

    color:#777;

}



.arrow{

    color:#aaa;

}


</style>


<?= $this->endSection() ?>
public function sekolah()
{
    $pengaturan = $this->pengaturanModel->first();

    return view('pengaturan/sekolah', [
        'title' => 'Informasi Sekolah',
        'pengaturan' => $pengaturan
    ]);
}