<?php $__env->startSection('header'); ?>
    <div class="inner-header text-center" style="background-image: url(<?php echo e($image ? asset($image) : asset('assets/web/images/contact.jpg')); ?>);">
        <h4><span><?php echo e($title ?? __('careers.inner_page')); ?></span></h4>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="contact2">
        <div class="contact-for section-padding">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="alert alert-success ajaxSuccess d-none"></div>
                        <div class="alert alert-danger ajaxError d-none"></div>
                        <form action="<?php echo e(route('careers')); ?>" method="post" class="form-row career_form" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            <div class="form-group col-lg-6">
                                <label><?php echo e(__('careers.name')); ?></label>
                                <input type="text" name="name" class="form-control" placeholder="<?php echo e(__('careers.name')); ?>">
                            </div>
                            <div class="form-group col-lg-6">
                                <label><?php echo e(__('careers.email')); ?></label>
                                <input type="text" name="email" class="form-control" placeholder="<?php echo e(__('careers.email')); ?>">
                            </div>
                            <div class="form-group col-lg-6">
                                <label><?php echo e(__('careers.phone')); ?></label>
                                <input type="tel" name="phone" class="form-control" placeholder="<?php echo e(__('careers.phone')); ?>">
                            </div>
                            <div class="form-group col-lg-6">
                                <label><?php echo e(__('careers.select')); ?></label>
                                <select class="form-control" name="type">
                                    <option value="individuals"><?php echo e(__('careers.individuals')); ?></option>
                                    <option value="companies"><?php echo e(__('careers.companies')); ?></option>
                                </select>
                            </div>
                            <div class="form-group col-12">
                                <div class="file-upload">
                                    <div class="file-upload-wrapper" data-text="<?php echo e(__('careers.press_to_upload')); ?>">
                                        <input name="job_file" type="file" class="file-upload-field" value="">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group col-lg-12">
                                <label> <?php echo e(__('careers.message')); ?></label>
                                <textarea name="message" rows="6" class="form-control" placeholder="<?php echo e(__('careers.message')); ?>"></textarea>
                            </div>
                            <div class="form-group col-lg-12 text-center">
                                <button class="butn color career_button"><span><?php echo e(__('careers.send')); ?></span></button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('inner_js'); ?>
    <script>
        $(document).ready(function () {
            $('.career_button').click(async function (e) {
                e.preventDefault();

                let interval = setInterval(function () {
                    $('.ajaxError, .ajaxSuccess').slideUp(400);
                    clearInterval(interval)
                }, 3000);

                let form = $('.career_form'),
                    data = new FormData(form[0]),
                    url = form.attr('action'),
                    method = form.attr('method');

                const response=await ajax({
                    url,
                    data,
                    dataType: 'json',
                    method
                });

                if (response.errors) {
                    $('.ajaxError').removeClass('d-none').slideDown().html(response.errors);
                    $('.ajaxSuccess').addClass('d-none');
                }
                if (response.message) {
                    $('.ajaxSuccess').removeClass('d-none').slideDown().html(response.message);
                    $('.ajaxError').addClass('d-none');
                    $('.career_form input[type!="file"], textarea').val('')
                }
            });
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('web.layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\nhz\resources\views/web/pages/careers.blade.php ENDPATH**/ ?>