<?php $__env->startSection('import-css'); ?>
    <link href="<?php echo e(asset('assets/admin/css/bootstrap-fileinput.css')); ?>" rel="stylesheet">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('style'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('assets/admin/build/css/intlTelInput.css')); ?>">
    <style>
        .intl-tel-input {
            position: relative;
            display: inline-block;
            width: 100%;!important;
        }
    </style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <!-- ========User-Panel-Section Starte Here ========-->
    <section id="basic-form-layouts">
        <div class="row">
            <div class="col-sm-12">
                <h2 class="content-header"><?php echo e(__($page_title)); ?></h2>
            </div>
        </div>

        <div class="row match-height">
            <div class="col-md-12">
                <div class="card">
                    <div class="card-header">
                        <div class="card-title-wrap bar-warning">

                        </div>
                    </div>
                    <div class="card-body">
                        <div class="px-3">

                            <form action="" method="post" enctype="multipart/form-data">
                                <?php echo csrf_field(); ?>
                                <div class="row">
                                    <div class="form-group col-sm-6">
                                        <label for="InputFirstname" class="col-form-label"><?php echo app('translator')->get('First Name:'); ?></label>
                                        <input type="text" class="form-control" id="InputFirstname"
                                               name="firstname"
                                               placeholder="<?php echo app('translator')->get('First Name'); ?>" value="<?php echo e($user->firstname); ?>">
                                    </div>

                                    <div class="form-group col-sm-6">
                                        <label for="lastname" class="col-form-label"><?php echo app('translator')->get('Last Name:'); ?></label>
                                        <input type="text" class="form-control" id="lastname"
                                               name="lastname"
                                               placeholder="<?php echo app('translator')->get('Last Name'); ?>" value="<?php echo e($user->lastname); ?>">
                                    </div>
                                </div>


                                <div class="row">
                                    <div class="form-group col-sm-6">
                                        <label for="email" class="col-form-label"><?php echo app('translator')->get('E-mail Address:'); ?></label>
                                        <input type="email" class="form-control" id="email" name="email"
                                               placeholder="<?php echo app('translator')->get('E-mail Address'); ?>" value="<?php echo e($user->email); ?>"
                                               required="">
                                    </div>

                                    <div class="form-group col-sm-6">
                                        <input type="hidden" id="track" name="country_code">
                                        <label for="phone" class="col-form-label"><?php echo app('translator')->get('Mobile Number'); ?></label>
                                        <input type="tel" class="form-control pranto-control" id="phone"
                                               name="mobile" value="<?php echo e($user->mobile); ?>"
                                               placeholder="<?php echo app('translator')->get('Your Contact Number'); ?>">
                                    </div>
                                    <input type="hidden" name="country" id="country" class="form-control d-none"
                                           value="<?php echo e($user->address->country); ?>">
                                </div>

                                <div class="row">
                                    <div class="form-group col-sm-6">
                                        <label for="address" class="col-form-label"><?php echo app('translator')->get('Address:'); ?></label>
                                        <input type="text" class="form-control" id="address"
                                               name="address"
                                               placeholder="<?php echo app('translator')->get('Address'); ?>" value="<?php echo e($user->address->address); ?>"
                                               required="">
                                    </div>
                                    <div class="form-group col-sm-6">
                                        <label for="state" class="col-form-label"><?php echo app('translator')->get('State:'); ?></label>
                                        <input type="text" class="form-control" id="state" name="state"
                                               placeholder="<?php echo app('translator')->get('state'); ?>" value="<?php echo e($user->address->state); ?>"
                                               required="">
                                    </div>
                                </div>


                                <div class="row">
                                    <div class="form-group col-sm-6">
                                        <label for="zip" class="col-form-label"><?php echo app('translator')->get('Zip Code:'); ?></label>
                                        <input type="text" class="form-control" id="zip" name="zip"
                                               placeholder="<?php echo app('translator')->get('Zip Code'); ?>" value="<?php echo e($user->address->zip); ?>"
                                               required="">
                                    </div>

                                    <div class="form-group col-sm-6">
                                        <label for="city" class="col-form-label"><?php echo app('translator')->get('City:'); ?></label>
                                        <input type="text" class="form-control" id="city" name="city"
                                               placeholder="<?php echo app('translator')->get('City'); ?>" value="<?php echo e($user->address->city); ?>" required="">
                                    </div>

                                </div>

                                <div class="row mt-4">
                                    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12">
                                        <div class="form-group">
                                            <div class="fileinput fileinput-new " data-provides="fileinput">
                                                <div class="fileinput-new thumbnail"
                                                     style="width: 200px; height: 150px;"
                                                     data-trigger="fileinput">
                                                    <img
                                                        src="<?php echo e(get_image(config('constants.user.profile.path') .'/'. $user->image)); ?>"
                                                        alt="...">

                                                </div>
                                                <div class="fileinput-preview fileinput-exists thumbnail"
                                                     style="max-width: 200px; max-height: 150px"></div>

                                                <div class="img-input-div">
                                        <span class="btn btn-info btn-file">
                                            <span class="fileinput-new "> <?php echo app('translator')->get('Select image'); ?></span>
                                            <span class="fileinput-exists"> <?php echo app('translator')->get('Change'); ?></span>
                                            <input type="file" name="image" accept="image/*">
                                        </span>
                                                    <a href="#" class="btn btn-danger fileinput-exists"
                                                       data-dismiss="fileinput"> <?php echo app('translator')->get('Remove'); ?></a>
                                                </div>

                                                <code><?php echo app('translator')->get('Image size 800*800'); ?></code>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group row pt-5">
                                    <div class="col-sm-12 text-center">
                                        <button type="submit"
                                                class="btn btn-danger btn-block text-center bg-3"><?php echo app('translator')->get('Update Profile'); ?></button>
                                    </div>
                                </div>
                            </form>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- ========User-Panel-Section Ends Here ========-->
<?php $__env->stopSection(); ?>


<?php $__env->startSection('load-js'); ?>
    <script src="<?php echo e(asset('assets/admin/js/bootstrap-fileinput.js')); ?>"></script>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script src="<?php echo e(asset('assets/admin/build/js/intlTelInput.js')); ?>"></script>

    <script>
        $('select[name=country]').val("<?php echo e(old('country')); ?>");


        $("#phone").on("countrychange", function(e, countryData) {
            // do something with countryData

            var data =  $(this).val('+' + countryData.dialCode)
            $('#track').val(data);
            var country = countryData.name;
            var country = country.split('(')[0];
            $('#country').val(country);
        });
        $("#phone").intlTelInput({
            geoIpLookup: function(callback) {
                $.get("https://ipinfo.io", function() {}, "jsonp").always(function(resp) {
                    var countryCode = (resp && resp.country) ? resp.country : "";
                    callback(countryCode);
                });
            },

            // hiddenInput: "full_number",
            initialCountry: "auto",
            utilsScript: "<?php echo e(asset('assets/admin/build/js/utils.js')); ?>"
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make(activeTemplate() .'layouts.user', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ectbest/ecoshop.top/core/resources/views/templates/minimal/user/edit-profile.blade.php ENDPATH**/ ?>