<?php if(isset($data)): ?>
    <?php if(count($data) > 0): ?>
        <style>
            .carousel-inner {
                border-top-left-radius   : 19px;
                border-bottom-left-radius: 19px;
                box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
            }
        </style>
        <div class="konten-col">
        <?php foreach($data as $key => $row): ?>
            <?php if($key == 0): ?>
            <div id="carouselBanner" class="carousel slide w-100" data-ride="carousel" data-interval="3000">
                <div class="carousel-inner">
            <?php endif; ?>
            <div class="carousel-item<?= $key == 0 ? ' active' : '' ?>">
                <img class="d-block img-fluid" src="<?= (ENVIRONMENT == 'development' ? 'https://apps.absenku.com/web/' : site_url()).'image?_t=file&_d='.$row->image_path ?>">
            </div>
            <?php if($key == count($data)-1): ?>
                </div>
            </div>
            <a class="carousel-control-prev" href="#carouselBanner" role="button" data-slide="prev">
                <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="carousel-control-next" href="#carouselBanner" role="button" data-slide="next">
                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>
            <?php endif; ?>
        <?php endforeach; ?>
        </div>
    <?php endif; ?>
<?php else: ?>
    <div class="konten-kiri konten-col">
        <div class="float-to-top">
            <h3 class="pt-2">Absenku Profesional</h3>
            <p>
                Mempermudah pekerjaan departemen HR (Human Resources) untuk pengelolaan aktifitas kehadiran karyawan secara real times, lebih efisien, transparan, dan akuntabel.
            </p>
        </div>
        <div class="float-to-center">
            <div class="text-center">
                <img src="<?= base_url('assets/images/laptopabsenku.png') ?>" alt="Login Absenku Karyawan">
            </div>
        </div>
        <div class="float-to-bottom">
            <div class="row">
                <div class="col">
                    <a href="https://registrasi.absenku.com/index.php/register/index/trial">
                        <button type="button" class="btn waves-effect waves-light btn-rounded btn-coba btn-block slideright">
                            <i class="fa fa-laptop"></i> Coba Absenku Full 7 Hari
                        </button>
                    </a>
                </div>
                <div class="col">
                    <a href="https://registrasi.absenku.com/index.php/register">
                        <button type="button" class="btn waves-effect waves-light btn-rounded btn-pesan btn-block slideright">
                            <i class="fa fa-shopping-cart"></i> Pesan Absenku Sekarang
                        </button>
                    </a>
                </div>
            </div>
        </div>
    </div>
<?php endif; ?>