@extends('auth_api.layouts.auth')
@section('title')
    {{ __('welcome') }}
@endsection
@section('content')
    @php
        $token_data = Crypt::decryptString($web_token);
        $token_data = unserialize(base64_decode($token_data)); //string to array
        // dd($token_data);
        $token_data['name'] = ucfirst($token_data['name']);
    @endphp
    <input type="hidden" name="token" id="token" value="{{ $token }}">
    <input type="hidden" name="web_token" id="web_token" value="{{ $web_token }}">
    <div class="mid-content common-space container" id="welcome_screen">
        
        <div class="heading">
            <a href="https://www.gradding.com/" class="logo" aria-label="logo">
                <img src="{{ asset('frontend') }}/student-panel/images/logo.svg" alt="logo" />
            </a>
            <p class="head">Hello {{ $token_data['name'] }}, <br>
                Welcome Onboard!!!</p>
            <img src="{{ asset('frontend') }}/student-panel/images/onboard.jpg" class="img" alt="onboard" />
            <p class="sub-head">Begin Your Study Abroad Journey with Gradding. Please Share Your Details for Personalised
                Assistance.
            </p>
        </div>

        <a href="javascript:;" id="lets_start_btn" class="btn">Let’s Start</a>
    </div>
@endsection
@section('css')
@endsection
@section('frontend_links')
    <link rel="stylesheet" href="{{ asset('frontend') }}/student-panel/css/login.css">
@endsection
@section('script')
    <script src="{{ asset('frontend') }}/student-panel/js/input-field.js"></script>
    {{-- <script src="{{ asset('frontend') }}/student-panel/js/verify_otp.js"></script> --}}
    <script>
        $('#lets_start_btn').on('click', function(e) {
            e.preventDefault();
            var token = $("#token").val();
            window.open('/auth/onboarding/' + token, '_self');
        })
    </script>
@endsection
