<?php if (auth()->user()->role == 'customer'): ?>
    <?= $this->extend('layouts/topbar') ?>
<?php else: ?>
    <?= $this->extend('layouts/sidebar') ?>
<?php endif; ?>

<?= $this->section('content') ?>
<section class="content">
    <div class="container-fluid">
        <!-- Small boxes (Stat box) -->
        <div class="card mb-3">
            <div class="card-body">
                <form method="POST" action="<?= base_url('customer/edit/' . $data->id_customer) ?>" enctype="multipart/form-data">
                    <?= csrf_field() ?>
                    <div class="form-group">
                        <label class="form-label" for="exampleInputNama">Nama Lengkap</label>
                        <input type="text" class="form-control" id="exampleInputNama" name="nama" placeholder="Input Nama" required value="<?= $data->nama ?>">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="exampleInputUsername">Username</label>
                        <input type="text" class="form-control" id="exampleInputUsername" name="username" placeholder="Input Username" required value="<?= $data->username ?>">
                    </div>
                    <div class="form-group">
                        <label class="form-label" for="exampleInputTelepon">Telepon</label>
                        <input type="text" class="form-control" id="exampleInputTelepon" name="telepon" placeholder="Input Telepon" required value="<?= $data->telepon ?>">
                    </div>
                    <!-- Address removed from customer master -->

                    <button type="submit" class="btn btn-primary">Simpan</button>
                </form>
            </div>
        </div>
    </div><!-- /.container-fluid -->
</section>
<?= $this->endSection() ?>