<?php if (isset($component)) { $__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\MasterLayout::class, ['assets' => $assets ?? []]); ?>
<?php $component->withName('master-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
    <div>
        <?php $id = $id ?? null;?>
        <?php echo e(Form::open(['route' => ['useraddress.store',], 'method' => 'post', 'id' => 'address_form'])); ?>

            <?php echo Form::hidden('user_id',$userdata->id); ?>

            <?php echo Form::hidden('country_id',$userdata->country_id); ?>

            <?php echo Form::hidden('city_id',$userdata->city_id); ?>

            <div class="row">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-header d-flex justify-content-between">
                            <div class="header-title">
                                <h5 class="font-weight-bold"><?php echo e($pageTitle); ?></h5>
                            </div>
                        </div>

                        <div class="card-body">
                            <div class="new-user-info">
                                <div class="row">
                                    <div class="form-group col-md-12">
                                        <?php echo e(Form::label('address',__('message.address').' <span class="text-danger">*</span>',['class'=>'form-control-label'],false)); ?>

                                        <?php echo e(Form::text('address', old('address'),['class' =>'form-control', 'id' => 'location' ,'required'])); ?>

                                    </div>
                                    <?php echo e(Form::hidden('latitude', null, ['id' => 'pickup_lat'])); ?>

                                    <?php echo e(Form::hidden('longitude', null, ['id' => 'pickup_lng'])); ?>

                                    <div class="form-group col-md-12">
                                        <?php echo e(Form::label('contact_number',__('message.contact_number').' <span class="text-danger">*</span>',['class'=>'form-control-label'], false )); ?>

                                        <?php echo e(Form::text('contact_number',  old('contact_number'),[ 'placeholder' => __('message.contact_number'), 'class' => 'form-control', 'id' => 'phone' ,'required' ])); ?>

                                    </div>
                                </div>
                                <hr>
                                <?php echo e(Form::submit( __('message.save'), ['class'=>'btn btn-md btn-primary float-right'])); ?>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <?php echo e(Form::close()); ?>

    </div>
    <?php $__env->startSection('bottom_script'); ?>
        <script>
            $(document).ready(function(){
                function pickupAutocomplete() {
                    var input = document.getElementById('location');
                    var autocomplete = new google.maps.places.Autocomplete(input);

                    autocomplete.addListener('place_changed', function () {
                    var place = autocomplete.getPlace();
                    document.getElementById('pickup_lat').value = place.geometry.location.lat();
                    document.getElementById('pickup_lng').value = place.geometry.location.lng();
                });
                }

                pickupAutocomplete();

                formValidation("#address_form", {
                    address: { required: true },
                    contact_number: { required: true },
                }, {
                    address: { required: "<?php echo e(__('message.please_enter_address')); ?>" },
                    contact_number: { required: "<?php echo e(__('message.please_enter_contact_number')); ?>" },
                });
            });
        </script>
    <?php $__env->stopSection(); ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23)): ?>
<?php $component = $__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23; ?>
<?php unset($__componentOriginalc6e081c8432fe1dd6b4e43af4871c93447ee9b23); ?>
<?php endif; ?>
<?php /**PATH /www/wwwroot/mxunzo.atharvatek.com/resources/views/clientside/address.blade.php ENDPATH**/ ?>