<style>
.profileImage {
    height: 200px;
    width: 200px;
    border-radius: 50%;
    aspect-ratio: 1;
    border: 4px solid #618C55
}

.profile_label {
    cursor: pointer;
}
</style>
<div class="">
    <div class="">
        <div class="row mb-2">
            <div class="col-sm-6">
                <div class="img-profile ml-4">

                </div>
                <h3 class="m-0 text-dark fmon">
                    <?php echo (isset($customerdetails)) ? 'Edit Customer' : 'Edit Customer' ?>
                </h3>
            </div><!-- /.col -->
            <div class="col-sm-12">

            

            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.container-fluid -->
</div>
<!-- Main content -->
<section class="">
    <div class="fmon">
        <form method="post"  enctype="multipart/form-data" id="customer_add" class=""
            action="<?php echo base_url() . "customer/updateuserdata/" . $id; ?>">
            <div class="card-body">

                <div class="row">
                    <?php
                    //  echo "<pre>";
                    //  print_r($customerdetails);
                    // echo "</pre>";
                    ?>
                    <div class="col-md-12 my-2">
                        <div class="form-group d-block">
                            <label class="form-label w-100 profile_label" for="profile_image">
                                <img src="<?php echo (isset($customerdetails)) ? $customerdetails['image'] : '' ?>" alt=""
                                    class="profileImage d-block mx-auto">
                            </label>
                            <input class="form-control d-none" type="file" name="profile_image" id="profile_image">

                        </div>
                    </div>
                    <div class="col-md-6 my-2">
                        <div class="form-group">
                            <label class="form-label">Name<span class="form-required">*</span></label>
                            <input type="text" required="true" class="form-control"
                                value="<?php echo (isset($customerdetails)) ? $customerdetails['name'] : '' ?>"
                                id="Name" name="Name" placeholder="Name">
                        </div>
                    </div>
                    <div class="col-md-6 my-2">
                        <div class="form-group">
                            <label class="form-label">Email</label>
                            <input type="text" readonly required="true" class="form-control"
                                value="<?php echo (isset($customerdetails)) ? $customerdetails['email'] : '' ?>"
                                id="email" placeholder="Customer Email">

                        </div>
                    </div>





                    <div class="col-md-6 my-2">
                        <div class="form-group">
                            <label class="form-label">Password<span class="form-required">* <span class="text-danger">if
                                        you fill this field password will b changed</span></span></label>
                            <input class="form-control" id="c_password" autocomplete="off" type="password"
                                placeholder="Password" name="newpassword" minlength="6">
                            <input type="hidden" name="password" value="<?php echo $customerdetails['password'] ?>" />
                        </div>
                    </div>


                    <div class="my-2 col-md-6 d-flex align-items-end">

                        <button type="submit" class=" btn btnC px-4 py-2">
                            <?php echo (isset($customerdetails)) ? 'Update Customer' : 'Add Customer' ?></button>
                    </div>


                </div>


            </div>
        </form>
    </div>
</section>
<!-- /.content -->