<?php $__env->startSection('content'); ?>


  <section class="inner_header">
        <div class="container">
            <div class="top">
                <a href="<?php echo e(url(getCurrentLocale().'/')); ?>"><?php echo e(__('web.home')); ?> </a>
                <span><?php echo e(__('web.contactus')); ?></span>
            </div>
            <h2><?php echo e(__('web.contactus')); ?></h2>
        </div>
    </section>
    <main>
        <!-- -------------- register --------------- -->
        <section class="register contact_pg">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6">
                        <div class="img text-center">
                            <img src="<?php echo e(url('')); ?>/assets/web/images/contact.jpg" alt="">
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="l_side">
                            <h4 class="mb-4"><?php echo e(__('web.contactdesc')); ?></h4>
                            <form onsubmit="contactdata(this)" method="post" action="<?php echo e(url(getCurrentLocale().'/contacting')); ?>"  class="form-row">
                                <?php echo csrf_field(); ?>
                                <div class="form-group col-12">
                                    <label><?php echo e(__('web.name')); ?> </label>
                                    <input name="name" type="text" class="form-control" placeholder="<?php echo e(__('web.name')); ?>">
                                </div>
                                <div class="form-group col-12">
                                    <label><?php echo e(__('web.email')); ?> </label>
                                    <input type="email" name="email" class="form-control" placeholder="<?php echo e(__('web.email')); ?>">
                                </div>
                                <div class="form-group col-12">
                                    <label><?php echo e(__('web.phone')); ?> </label>
                                    <input name="phone" type="number" class="form-control" placeholder="<?php echo e(__('web.phone')); ?>">
                                </div>
                                <div class="form-group col-12">
                                    <label><?php echo e(__('web.subject')); ?></label>
                                    <select name="type_id" class="form-control">
                                        <?php $__currentLoopData = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($row->id); ?>"> <?php echo e(typename($row->id)); ?> </option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        
                                    </select>
                                </div>
                                <div class="form-group col-12">
                                    <label><?php echo e(__('web.msg')); ?></label>
                                    <textarea rows="8" name="message" class="form-control" placeholder="<?php echo e(__('web.msg')); ?> "></textarea>
                                </div>
                                <div class="form-group col-12 text-center">
                                    <button class="butn main_bg"><span> <i class="fas fa-paper-plane ml-2"></i> <?php echo e(__('web.send')); ?> </span></button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
              <div class="modal fade modal_login" id="contactsuccess" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered" role="document">
                <div class="modal-content">
                    <div class="modal-body text-center">
                        <div class="icon">
                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/checked.svg" alt="">
                        </div>
                        <h4>  <?php echo e(__('web.success')); ?> </h4>
                    </div>
                </div>
            </div>
        </div>
        
         <div class="modal fade modal_login" id="contactfailed" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered" role="document">
                <div class="modal-content">
                    <div class="modal-body text-center">
                        <div class="icon">
                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/alert.svg" alt="">
                        </div>
                        <div id="contacterrors" class="alert alert-danger">
                             
                        </div>
                       
                        
                    </div>
                </div>
            </div>
        </div>
        </section>

        <!-- -------------- inner_subscribe --------------- -->
        <section class="inner_subscribe">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6">
                        <div class="r_side">
                            <div class="icons">
                                <i class="fas fa-location-arrow"></i>
                            </div>
                            <div class="info">
                                <h6><?php echo e(__('web.sub_mail')); ?></h6>
                                <p><?php echo e(__('web.sub_mail_desc')); ?></p>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="l_side">
                            <form onsubmit="subscribedata(this)" method="post" action="<?php echo e(url(getCurrentLocale().'/subcribe')); ?>"  class="form-row">
                                <?php echo csrf_field(); ?>
                                <div class="form-group col-12">
                                    <input type="email" name="email" placeholder="<?php echo e(__('web.email')); ?>">
                                    <button><?php echo e(__('web.subscribe')); ?></button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal fade modal_login" id="mailsuccess" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered" role="document">
                <div class="modal-content">
                    <div class="modal-body text-center">
                        <div class="icon">
                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/checked.svg" alt="">
                        </div>
                        <h4> <?php echo e(__('web.success')); ?> </h4>
                    </div>
                </div>
            </div>
        </div>
        
         <div class="modal fade modal_login" id="mailfailed" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered" role="document">
                <div class="modal-content">
                    <div class="modal-body text-center">
                        <div class="icon">
                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/alert.svg" alt="">
                        </div>
                        <div id="mailerrors" class="alert alert-danger">
                             
                        </div>
                       
                        
                    </div>
                </div>
            </div>
        </div>
        </section>


    </main>
     
    <?php $__env->startPush('js'); ?>
<script>
    function subscribedata(elem) {
    event.preventDefault();
   
         let action = $(elem).attr('action');
       
       let urls = action;
       
       let dataform = new FormData( $(elem)[0]);
        
     
      $.ajax({
          url : urls,
          type: 'POST',              
          data: dataform,
          contentType: false, 
          processData: false, 
          success:function(data)
          {
            
            $("#mailsuccess").modal('show');
               }
          ,error: function (data) {
              
              $('#mailerrors').html('');
   $.each(data.responseJSON.errors, function(key,value) {
      
     $('#mailerrors').append('<h4 >'+value+'</h4>');
     
 }); 
 
  $("#mailfailed").modal('show');
 
}
        })


}
function contactdata(elem) {
    event.preventDefault();
   
         let action = $(elem).attr('action');
       
       let urls = action;
       
       let dataform = new FormData( $(elem)[0]);
        
     
      $.ajax({
          url : urls,
          type: 'POST',              
          data: dataform,
          contentType: false, 
          processData: false, 
          success:function(data)
          {
            
            $("#contactsuccess").modal('show');
             window.setTimeout(function(){location.reload()},500)
               }
          ,error: function (data) {
              
              $('#contacterrors').html('');
   $.each(data.responseJSON.errors, function(key,value) {
      
     $('#contacterrors').append('<h4 >'+value+'</h4>');
     
 }); 
 
  $("#contactfailed").modal('show');
 
}
        })


}

</script>
<?php $__env->stopPush(); ?>
    <?php $__env->stopSection(); ?>
<?php echo $__env->make('web.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/omaralyomhost/public_html/hanqr/resources/views/web/pages/contactus.blade.php ENDPATH**/ ?>