@extends('layouts.landing_page.master')

@section('title', __('Verify your email address'))

@push('styles')
    <meta http-equiv="cache-control" content="private, max-age=0, no-cache">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="expires" content="0">
    <link href="{{ asset('frontend/styles/css/page-css/login-register-page.css') }}" rel="stylesheet">
@endpush

@section('content')
    <section id="signin" class="h-100vh">
        <div class="container bgm-shadows">
            <div class="row">
                <div class="col-lg-7 col-md-12 col-sm-12 col-12 my-auto">
                    <img class="d-block" src="{{ asset('frontend/images/logo.png') }}" alt="..." width="95px"
                         height="95px" />
                    <h2 class="lgm-title mt-2">{{ __('Verify your email address') }}</h2>
                </div>
                <div class="col-lg-1 col-md-12 col-sm-12 col-1"></div>
                <div class="col-lg-4 col-md-12 col-sm-12 col-12">
                    <form method="POST" action="{{ route('member.verification.resend') }}" id="resendLinkForm" onsubmit="return false;">
                        <div id="form3" class="grid md:grid-cols-1 gap-1">
                            @if (session('resent'))
                                <div class="alert alert-success" role="alert">
                                    {{__('Verification link has been sent to your email address.')}}
                                </div>
                            @else
                                <div class="relative z-0 w-full mb-2 group">
                                    <b>{{ __('Before proceeding, please check your email for a verification link.') }}</b> </br>
                                    {{ __('If you did not receive the email, please check your spam or junk folder.') }} </br>  {{ __('You can also request a new verification link below.') }}
                                </div>

                                <button type="submit" class="w-full primarym-btn text-center resend-btn" onclick="postreq(event, 'resendLinkForm')" >{!! renderIconHtml('link') !!}Resend Link</button>
                                <p class="txt-title text-center mt-3">Lost access to your email? <a href="javascript:void(0)" class="linked wantToUpdateEmailBtn">{{ __('Update it now.') }}</a></p>
                            @endif
                        </div>
                    </form>
                    <form method="POST" action="{{ route('member.verification.update') }}" class="mt-2" id="updateEmailForm" style="display: none">
                        <div id="form2" class="grid md:grid-cols-1 gap-1">
                            <div class="relative z-0 w-full mb-1 group">
                                <input type="text" name="email"
                                       id="email"
                                       class="form-control email-validation block border-clr p-2.5 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-700 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer"
                                       placeholder="" aria-describedby="inputGroupPrependchangeemail" />
                                <label for="email" class="ml-2 p-2 py-0 peer-focus:font-medium absolute text-sm text-gray-500 dark:text-gray-400 duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:start-0 rtl:peer-focus:translate-x-1/4 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 bg-white">{{ __('New email') }}</label>
                            </div>
                            <span id="email_error" class="custom-error m-0 p-0"></span>

                        </div>

                        <button type="submit" class="w-full primarym-btn text-center mt-2 update-email-btn" onclick="postreq(event,'updateEmailForm')">{!! renderIconHtml('link') !!}{{ __('Change email & send link') }}</button>
                        <p class="txt-title text-center mt-3"><a href="javascript:void(0)" class="linked backBtn">{!! renderIconHtml('back') !!}{{ __('Back') }}</a></p>
                    </form>
                </div>
            </div>
        </div>
    </section>
@endsection

@push('scripts')
    <script src="{{asset('frontend/js/page-js/auth/verify-blade.js')}}"></script>
@endpush
