
<?php $__env->startSection('content'); ?>
<?php
$policyPages = getContent('policy_pages.element',false,null,true);
?>
<!--=======-** Sign In start **-=======-->
<section class="account">
    <div class="row">
        <div class="col-xl-7 left-side">
            <img src="<?php echo e(asset($activeTemplateTrue .'images/sign.png')); ?>" class="d-none d-xl-block"
                alt="<?php echo app('translator')->get('image'); ?>">
        </div>
        <div class="col-xl-5 right-side">
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-xl-8 col-lg-10 col-md-10 col-12 main">
                        <div class="logo">
                            <a href="<?php echo e(route('home')); ?>">
                                <img src="<?php echo e(getImage(getFilePath('logoIcon').'/logo.png', '?'.time())); ?>" alt="<?php echo e(config('app.name')); ?>">
                            </a>
                        </div>
                        <div class="account-form">
                            <div>
                                <h3><?php echo app('translator')->get('Sign Up!'); ?></h3>
                            </div>
                            <form action="<?php echo e(route('user.register')); ?>" method="POST" class="verify-gcaptcha">
                                <?php echo csrf_field(); ?>
                                <div class="row gy-3">
                                    <div class="col-lg-6 col-12">
                                        <div class="form-group">
                                            <label for="name" class="form--label"><?php echo app('translator')->get('Username'); ?></label>
                                            <input type="text" class="form--control checkUser" id="username"
                                                name="username" value="<?php echo e(old('username')); ?>"
                                                placeholder="<?php echo app('translator')->get('Username'); ?>" required>
                                            <small class="text-danger usernameExist"></small>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-12">
                                        <div class="form-group">
                                            <label for="username" class="form--label"><?php echo app('translator')->get('E-Mail Address'); ?></label>
                                            <input type="email" class="form--control checkUser" id="email" name="email"
                                                value="<?php echo e(old('email')); ?>" placeholder="<?php echo app('translator')->get('Email'); ?>" required>
                                            <small class="text-danger emailExist"></small>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-12">
                                        <div class="form-group">
                                            <label class="form--label"><?php echo app('translator')->get('Country'); ?></label>
                                            <select name="country" class="form-select form--control">
                                                <?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option data-mobile_code="<?php echo e($country->dial_code); ?>"
                                                    value="<?php echo e($country->country); ?>" data-code="<?php echo e($key); ?>">
                                                    <?php echo e(__($country->country)); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-12">
                                        <div class="form-group">
                                            <label class="form--label"><?php echo app('translator')->get('Mobile'); ?></label>
                                            <div class="input-group ">
                                                <span class="input-group-text bg--base text-white mobile-code"></span>
                                                <input type="hidden" name="mobile_code">
                                                <input type="hidden" name="country_code">
                                                <input type="number" name="mobile" value="<?php echo e(old('mobile')); ?>"
                                                    class="form-control form--control checkUser" required>
                                            </div>
                                            <small class="text-danger mobileExist"></small>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <label for="your-password" class="form--label"><?php echo app('translator')->get('Password'); ?></label>
                                        <div class="input-group">
                                            <input id="password" type="password"
                                                class="form-control form--control form--password" name="password"
                                                placeholder="<?php echo app('translator')->get('Password'); ?>" required>
                                            <div class="password-show-hide toggle-password-change fas fa-eye-slash"
                                                data-target="password">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <label for="confirm-password" class="form--label"><?php echo app('translator')->get('Confirm
                                            Password'); ?></label>
                                        <div class="input-group">
                                            <input id="confirm-password" type="password"
                                                class="form-control form--control form--password"
                                                name="password_confirmation" placeholder="<?php echo app('translator')->get('Confirm Password'); ?>"
                                                required>
                                            <div class="password-show-hide toggle-password-change fas fa-eye-slash"
                                                data-target="confirm-password">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-12">
                                        <?php if (isset($component)) { $__componentOriginalff0a9fdc5428085522b49c68070c11d6 = $component; } ?>
<?php $component = App\View\Components\Captcha::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('captcha'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Captcha::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalff0a9fdc5428085522b49c68070c11d6)): ?>
<?php $component = $__componentOriginalff0a9fdc5428085522b49c68070c11d6; ?>
<?php unset($__componentOriginalff0a9fdc5428085522b49c68070c11d6); ?>
<?php endif; ?>
                                    </div>
                                    <?php if($general->agree): ?>
                                    <div class="col-sm-12 my-2">
                                        <div class="form--check">
                                            <input class="form-check-input me-2" type="checkbox" id="agree"
                                                <?php if(old('agree')): echo 'checked'; endif; ?> name="agree" required>
                                            <label for="agree"> <?php echo app('translator')->get('I agree with'); ?>
                                                <?php $__currentLoopData = $policyPages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $policy): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <a href="<?php echo e(route('policy.pages',[slug($policy->data_values->title),$policy->id])); ?>"
                                                    class="text--base"><?php echo e(__($policy->data_values->title)); ?></a>
                                                <?php if(!$loop->last): ?>, <?php endif; ?>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </label>
                                        </div>
                                    </div>
                                    <?php endif; ?>
                                    <div class="col-12">
                                        <button type="submit" class="btn btn--base w-100" id="recaptcha"><?php echo app('translator')->get('Sign Up'); ?></button>
                                    </div>
                                  
                                    <div class="col-12">
                                        <div class="text-center">
                                            <p class="text"><?php echo app('translator')->get('Already Have An Account'); ?>?
                                                <a href="<?php echo e(route('user.login')); ?>" class="text--base"><?php echo app('translator')->get('Login Now'); ?></a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!--=======-** Sign In End **-=======-->

<div class="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--danger 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('style'); ?>
<style>
    .country-code .input-group-text {
        background: #fff !important;
    }

    .country-code select {
        border: none;
    }

    .country-code select:focus {
        border: none;
        outline: none;
    }
</style>
<?php $__env->stopPush(); ?>

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

            <?php if($mobileCode): ?>
            $(`option[data-code=<?php echo e($mobileCode); ?>]`).attr('selected','');
            <?php endif; ?>

            $('select[name=country]').change(function(){
                $('input[name=mobile_code]').val($('select[name=country] :selected').data('mobile_code'));
                $('input[name=country_code]').val($('select[name=country] :selected').data('code'));
                $('.mobile-code').text('+'+$('select[name=country] :selected').data('mobile_code'));
            });
            $('input[name=mobile_code]').val($('select[name=country] :selected').data('mobile_code'));
            $('input[name=country_code]').val($('select[name=country] :selected').data('code'));
            $('.mobile-code').text('+'+$('select[name=country] :selected').data('mobile_code'));

            $('.checkUser').on('focusout',function(e){
                var url = '<?php echo e(route('user.checkUser')); ?>';
                var value = $(this).val();
                var token = '<?php echo e(csrf_token()); ?>';
                if ($(this).attr('name') == 'mobile') {
                    var mobile = `${$('.mobile-code').text().substr(1)}${value}`;
                    var data = {mobile:mobile,_token:token}
                }
                if ($(this).attr('name') == 'email') {
                    var data = {email:value,_token:token}
                }
                if ($(this).attr('name') == 'username') {
                    var data = {username:value,_token:token}
                }
                $.post(url,data,function(response) {
                  if (response.data != false && response.type == 'email') {
                    $('#existModalCenter').modal('show');
                  }else if(response.data != false){
                    $(`.${response.type}Exist`).text(`${response.type} already exist`);
                  }else{
                    $(`.${response.type}Exist`).text('');
                  }
                });
            });
        })(jQuery);

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

<?php echo $__env->make($activeTemplate.'layouts.auth', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/webtechscom/public_html/smm.webtechs.com.ng/application/resources/views/presets/themeTwo/user/auth/register.blade.php ENDPATH**/ ?>