@extends('layout.main')
@section('title') Register | @parent @endsection
@section('main')

    <div class="">
        <!--<div class="row">
            <div class=" col-md-4 col-sm-4 col-xs-12">
                <div class="info-box bg-white ">
                    <h4><i class="fa fa-edit"></i> </h4>
                    <p class="intro"> View, edit and delete your ads. </p>
                </div>
            </div>

            <div class="col-md-4 col-sm-4 col-xs-12">
                <div class="info-box bg-white ">
                    <h4><i class="fa fa-clock-o"></i> </h4>
                    <p class="intro"> Quick publish new ads with contact details. </p>
                </div>
            </div>

            <div class="col-md-4 col-sm-4 col-xs-12">
                <div class="info-box bg-white ">
                    <h4><i class="fa fa-bar-chart-o"></i> </h4>
                    <p class="intro"> Keep track of your favorite ads. </p>
                </div>
            </div>

        </div>-->

            <div class="kupeza-register">
                <div class="login-picture">
            
                </div>
                <div class='reg-form'>
                    <h3 class="authTitle text-center" style="
                        margin-top: 30%;
                        color: #a930bd;
                        border-top: 2px solid #fc8d04;
                        border-bottom: 2px solid #fc8d04;
                        padding: 70px 0;
                    ">
                        Your Account has been Verified.<br > Login and Enjoy the Kupeza Experience<br ><span style='margin-top:20px;'> Go to
                        <a href="{{ route('login') }}">Login</a></span>
                    </h3>
                    
                </div>
                
            
            </div>

@endsection

@section('page-js')
    <script>
        $(document).ready(function() {
            $('#phone').keyup(function(){
                $(this).val($(this).val().replace(/[^0-9]/g,""));
            });
        });

    </script>

    <script>
        var AccTok = [];
        
        function autocomplete(inp, arr) { 
        var currentFocus;       
        inp.addEventListener("input", function(e) {
            var a, b, i, val = this.value;
            
            closeAllLists();
            if (!val) { return false;}
            currentFocus = -1;
            
            a = document.createElement("DIV");
            a.setAttribute("id", this.id + "autocomplete-list");
            a.setAttribute("class", "autocomplete-items");            
            this.parentNode.appendChild(a);
            
            for (i = 0; i < arr.length; i++) {
              
                if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
               
                b = document.createElement("DIV");
                b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
                b.innerHTML += arr[i].substr(val.length);

                b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
                
                    b.addEventListener("click", function(e) {
                    inp.value = this.getElementsByTagName("input")[0].value;

                    closeAllLists();
                });
                a.appendChild(b);
                }
            }
        });

        inp.addEventListener("keydown", function(e) {
            var x = document.getElementById(this.id + "autocomplete-list");
            if (x) x = x.getElementsByTagName("div");
            if (e.keyCode == 40) {
                currentFocus++;
                addActive(x);
            } else if (e.keyCode == 38) { 
                currentFocus--;
                addActive(x);
            } else if (e.keyCode == 13) {
               
                e.preventDefault();
                if (currentFocus > -1) {              
                if (x) x[currentFocus].click();
                }
            }
        });
        function addActive(x) {
          
            if (!x) return false;

            removeActive(x);
            if (currentFocus >= x.length) currentFocus = 0;
            if (currentFocus < 0) currentFocus = (x.length - 1);
            x[currentFocus].classList.add("autocomplete-active");
        }
        function removeActive(x) {
            for (var i = 0; i < x.length; i++) {
            x[i].classList.remove("autocomplete-active");
            }
        }
        function closeAllLists(elmnt) {
            
            var x = document.getElementsByClassName("autocomplete-items");
            for (var i = 0; i < x.length; i++) {
            if (elmnt != x[i] && elmnt != inp) {
            x[i].parentNode.removeChild(x[i]);
            }
        }
        }
        
        document.addEventListener("click", function (e) {
            closeAllLists(e.target);
        });
        }
    </script>
    <script>
        autocomplete(document.getElementById("access_token"), AccTok);
    </script>
@endsection
