<?php $__env->startSection('panel'); ?>
    <main>
        <div class="account-section bg-img" data-background-image="<?php echo e(asset($activeTemplateTrue . 'images/account-bg.png')); ?>">
            <?php echo $__env->make('Template::user.auth.auth_sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

            <div class="account-content">
                <form action="<?php echo e(route('user.register')); ?>" method="POST" class="account-form verify-gcaptcha disableSubmission">
                    <?php echo csrf_field(); ?>
                    <div class="account-heading">
                        <a href="<?php echo e(route('home')); ?>" class="account-heading__logo">
                            <img class="logo-img" src="<?php echo e(siteLogo()); ?>" alt="Logo">
                        </a>
                        <h3 class="account-heading__title"><?php echo app('translator')->get('Sign up'); ?></h3>
                        <h5 class="account-heading__text"><?php echo app('translator')->get('Start resolving issues by signing up.'); ?></h5>
                    </div>
                    <div class="row">
                        <div class="form-group col-md-6">
                            <label class="form--label style-two"><?php echo app('translator')->get('First Name'); ?></label>
                            <input type="text" class="form--control md-style" name="firstname" value="<?php echo e(old('firstname')); ?>" required>
                        </div>
                        <div class="form-group col-md-6">
                            <label class="form--label style-two"><?php echo app('translator')->get('Last Name'); ?></label>
                            <input type="text" class="form--control md-style" name="lastname" value="<?php echo e(old('lastname')); ?>" required>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="form--label style-two"><?php echo app('translator')->get('Mobile'); ?></label>
                        <input type="text" class="form--control md-style checkUser" name="mobile" value="<?php echo e(old('mobile')); ?>" required>
                        <small class="text--danger mobileExist"></small>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="form--label style-two"><?php echo app('translator')->get('E-Mail Address'); ?></label>

                            <div class="input-wrapper">
                                <span class="input-wrapper__label-icon">
                                    <i class="fa-regular fa-envelope"></i>
                                </span>
                                <input type="email" class="form--control md-style checkUser" name="email" value="<?php echo e(old('email')); ?>" required>
                            </div>

                        </div>
                    </div>

                    <div class="form-group">
                        <label class="form--label style-two"><?php echo app('translator')->get('Password'); ?></label>
                        <div class="input-wrapper">
                            <span class="input-wrapper__label-icon">
                                <?php echo $__env->make('admin.partials.svg.lock', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            </span>
                            <input type="password" name="password" class="form--control md-style" required>
                            <span class="password-show-hide fa-regular fa-eye toggle-password fa-eye-slash" id="#password"></span>
                        </div>

                    </div>

                    <div class="form-group">
                        <label class="form--label style-two"><?php echo app('translator')->get('Confirm Password'); ?></label>
                        <div class="input-wrapper">
                            <span class="input-wrapper__label-icon">
                                <?php echo $__env->make('admin.partials.svg.lock', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            </span>
                            <input type="password" name="password_confirmation" class="form--control md-style" required>
                            <span class="password-show-hide fa-regular fa-eye toggle-password fa-eye-slash" id="#password_confirmation"></span>
                        </div>

                    </div>

                    <?php if (isset($component)) { $__componentOriginalff0a9fdc5428085522b49c68070c11d6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalff0a9fdc5428085522b49c68070c11d6 = $attributes; } ?>
<?php $component = App\View\Components\Captcha::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('captcha'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\Captcha::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalff0a9fdc5428085522b49c68070c11d6)): ?>
<?php $attributes = $__attributesOriginalff0a9fdc5428085522b49c68070c11d6; ?>
<?php unset($__attributesOriginalff0a9fdc5428085522b49c68070c11d6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalff0a9fdc5428085522b49c68070c11d6)): ?>
<?php $component = $__componentOriginalff0a9fdc5428085522b49c68070c11d6; ?>
<?php unset($__componentOriginalff0a9fdc5428085522b49c68070c11d6); ?>
<?php endif; ?>

                    <?php if(gs('agree')): ?>
                        <?php
                            $policyPages = getContent('policy_pages.element', false, orderById: true);
                        ?>
                        <div class="form-group">
                            <div class="form--check">
                                <input type="checkbox" class="form-check-input" id="agree" <?php if(old('agree')): echo 'checked'; endif; ?> name="agree" required>
                                <label class="form-check-label" for="agree"> <?php echo app('translator')->get(' I agree with'); ?>
                                    <span class="ms-1">
                                        <?php $__currentLoopData = $policyPages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $policy): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <a href="<?php echo e(route('policy.pages', $policy->slug)); ?>" target="_blank"><?php echo e(__($policy->data_values->title)); ?></a>
                                            <?php if(!$loop->last): ?>
                                                ,
                                            <?php endif; ?>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </span>
                                </label>
                            </div>
                        </div>
                    <?php endif; ?>
                    <div class="form-group">
                        <button type="submit" id="recaptcha" class="btn btn--base btn--md w-100"> <?php echo app('translator')->get('Register'); ?></button>
                    </div>
                    <p class="mb-0 fs-14"><?php echo app('translator')->get('Already have an account?'); ?> <a href="<?php echo e(route('user.login')); ?>"><?php echo app('translator')->get('Login'); ?></a></p>
                </form>

            </div>
        </div>
    </main>

    <div class="modal custom--modal fade" id="existModalCenter" tabindex="-1" role="dialog" aria-labelledby="existModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="existModalLongTitle"><?php echo app('translator')->get('You are with us'); ?></h5>
                    <span type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                        <i class="las la-times"></i>
                    </span>
                </div>
                <div class="modal-body">
                    <h6 class="text-center"><?php echo app('translator')->get('You already have an account please Login '); ?></h6>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-dark btn--sm" data-bs-dismiss="modal"><?php echo app('translator')->get('Close'); ?></button>
                    <a href="<?php echo e(route('user.login')); ?>" class="btn btn--base btn--sm"><?php echo app('translator')->get('Login'); ?></a>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>


<?php $__env->startPush('script'); ?>
    <script>
        "use strict";
        (function($) {

            $('.checkUser').on('focusout', function(e) {
                var url = '<?php echo e(route('user.checkUser')); ?>';
                var value = $(this).val();
                var token = '<?php echo e(csrf_token()); ?>';
                var inputName = $(this).attr('name');
                var data = {
                    _token: token
                };

                if (inputName === 'mobile') {
                    data.mobile = value;
                } else if (inputName === 'email') {
                    data.email = value;
                }

                $('.mobileExist').text('');

                $.post(url, data, function(response) {
                    if (response.data != false && response.type == 'mobile') {
                        $('.mobileExist').text(`<?php echo app('translator')->get('Mobile already exists'); ?>`);
                    }

                    if (response.data != false && response.type == 'email') {
                        $('#existModalCenter').modal('show');
                    }
                });
            });

        })(jQuery);
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make($activeTemplate . 'layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\projects\custom_viserdesk\Files\core\resources\views/templates/basic/user/auth/register.blade.php ENDPATH**/ ?>