<?php $__env->startSection('sitecontent'); ?>
<section class="headerbg headerbg-inner">
    <div class="header header-padding">
        <?php echo $__env->make('partials.site.header-menu', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </div>
    <div class="inner-heading"><?php echo e(__('lang.saved_addresses_title')); ?></div>
</section>
<section class="order-details-bg">
    <div class="container">
        <div class="row">
            <div class="col-lg-3 col-md-4">
                <?php echo $__env->make('partials.site.user-links', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            </div>
            <div class="col-lg-9 col-md-8">
                <?php if(Session::has('message')): ?>
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="alert alert-success" role="alert">
                              <?php echo e(Session::get('message')); ?>

                            </div>
                        </div>
                    </div>
                <?php endif; ?>
                <?php if(Session::has('error')): ?>
                <div class="row">
                    <div class="col-lg-12">
                        <div class="alert alert-danger" role="alert">
                          <?php echo e(Session::get('error')); ?>

                        </div>
                    </div>
                </div>
                <?php endif; ?>
                <div class="add-address white-bg">
                    <span onclick="showAddressForm()" style="cursor: pointer;"><?php echo e(__('lang.add_address')); ?></span>
                    <a href="javascript:;" onclick="showAddressForm()"><img src="<?php echo e(asset('site-assets/images/plusico.png')); ?>" style="width: 30%;" /></a> 
                </div>
                <?php echo Form::model(null, ['method' => 'POST', 'url' => ['add-address']]); ?>

                    <?php echo csrf_field(); ?>
                    <input type="hidden" name="location_name" id="location_name" value="">
                    <input type="hidden" name="latitude" id="latitude" value="">
                    <input type="hidden" name="longitude" id="longitude" value="">
                    <input type="hidden" name="city" id="city" value="">
                    <input type="hidden" name="state" id="state" value="">
                    <input type="hidden" name="zipcode" id="zipcode" value="">
                    <input type="hidden" name="country" id="country" value="">
                    <div class="addressformbg" id="addAddressForm" style="display: none">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="map">
                                    <div id="myMap" style="height: 600px;width: 100%;position: relative;overflow: hidden;border: 1px solid #a5a5a5;border-radius: 5px;margin-bottom: 5px"></div>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="addressform">
                                    <div class="row">
                                        <div class="form-group col-md-12">
                                            <label><?php echo e(__('lang.address_detact_location')); ?></label>
                                            <input type="text" class="form-control" name="google_address" id="google_address"  placeholder="<?php echo e(__('lang.address_detact_location')); ?>" />
                                        </div>
                                        <div class="form-group col-md-12">
                                            <label><?php echo e(__('lang.address_type')); ?></label>
                                            <div class="radio">
                                                <input label="" type="radio" id="Home" name="type" value="<?php echo e(__('lang.address_home')); ?>" checked />
                                                <input label="" type="radio" id="Office" name="type" value="<?php echo e(__('lang.address_office')); ?>" />
                                                <input label="" type="radio" id="Mosque" name="type" value="<?php echo e(__('lang.address_mosque')); ?>" />
                                                <input label="" type="radio" id="other" name="type" value="<?php echo e(__('lang.address_other')); ?>" />
                                            </div>
                                        </div>
                                        <div class="form-group col-md-12">
                                            <label><?php echo e(__('lang.address_title')); ?></label>
                                            <input type="text" class="form-control" name="address" placeholder="<?php echo e(__('lang.address_title')); ?>" />
                                        </div>
                                        <div class="form-group col-md-12">
                                            <label><?php echo e(__('lang.placeholder_note')); ?></label>
                                            <textarea class="form-control" name="note" id="note" placeholder="<?php echo e(__('lang.placeholder_note')); ?>" style="height: 70px;"  ></textarea>
                                        </div>
                                        <div class="form-group col-md-12">
                                            <button class="save-btn text-uppercase float-left" type="submit"><?php echo e(__('lang.save_button')); ?>&nbsp;&nbsp;<img src="<?php echo e(asset('site-assets/images/arrowright.png')); ?>" class="mt-n-1" /></button>
                                            <button class="save-btn text-uppercase float-right" style="background: #af7ab3;"><?php echo e(__('lang.cancel_button')); ?>&nbsp;&nbsp;<img src="<?php echo e(asset('site-assets/images/arrowright.png')); ?>" class="mt-n-1" /></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php echo Form::close(); ?>

                <div class="select-address save-addresses white-bg">
                    <?php if(count($data)>0): ?>
                        <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="custom-control white-bg">
                                <label class="custom-control-label"> <span><?php echo e($row->type); ?></span> <?php if($row->address!=''): ?> <?php echo e($row->address); ?>, <?php endif; ?>  <?php if($row->city!=''): ?> <?php echo e($row->city); ?>, <?php endif; ?>  <?php if($row->state!=''): ?> <?php echo e($row->state); ?>, <?php endif; ?> <?php echo e($row->zipcode); ?></label>
                                <a onclick="return confirm('<?php echo e(__('lang.address_delete_confirm')); ?>');" href="<?php echo e(url('/delete-address')); ?>/<?php echo e($row->id); ?>"><img src="<?php echo e(asset('site-assets/images/delete-icon.png')); ?>" style="width: 25px;"/></a>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</section>
<footer class="footer">
    <?php echo $__env->make('partials.site.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</footer>
<script type="text/javascript">
    setTimeout(function(){
        getLocation();
    },1500);
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.site-app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/waterfl/public_html/resources/views/saved-addresses.blade.php ENDPATH**/ ?>