@extends('layouts.master')

@section('title', e(__('Generate New Account')))

@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/login-register-page.css') }}" rel="stylesheet">
@endpush

@section('content')
    <section id="register" class="register">
        <div class="container text-center">
            <div id="guest-container" class="col-xs-12 col-md-12 col-lg-12 col-xl-12 col-xxl-12">
                <div class="row ml-5 mr-5 justify-content-center">
                    <div class="col-md-8 col-lg-9 col-xl-8 col-xxl-9">
                        <div id="register_box" class="guest-box">
                            <h2 class="title">{{__('Generate New Account')}}</h2>
                            <form action="{{ route('member.generateNewAccount') }}" method="POST">
                                @csrf @method('POST')
                                <div class="form-group mb-3">
                                    <div class="input-group">
                                        <div class="input-group-prepend">
                                            <span class="input-group-text bg-transparent"><i class="fas fa-envelope"></i></span>
                                        </div>
                                        <input type="hidden" name="email" value="{{ old('email', $email)}}" hidden>
                                        <input type="email"
                                               name="email"
                                               class="form-control pl-15 bg-transparent @error('email') border-danger @enderror"
                                               placeholder="Email Address"
                                               aria-label="email"
                                               required
                                               disabled
                                               value="{{ old('email', $email)}}"
                                        >
                                    </div>

                                    @error('email')
                                    <div class="text-danger text-start">{{ $message }}</div>
                                    @enderror
                                </div>

                                <div class="form-group mb-3">
                                    <div class="input-group">
                                        <div class="input-group-prepend">
                                            <span class="input-group-text  bg-transparent"><i class="fas fa-lock"></i></span>
                                        </div>
                                        <input type="password" name="password"
                                               class="form-control login-form signin-input @error('password') border-danger @enderror"
                                               id="password" aria-label="password" placeholder="Password"
                                               value="{{old('password')}}" autocomplete="off">
                                        <div class="input-group-prepend passwordToText">
                                    <span class="input-group-text bg-transparent"><i class="bi bi-eye"></i>
                                    </span>
                                        </div>

                                    </div>
                                    @error('password')
                                    <div class="text-danger text-start">{{ $message }}</div>
                                    @enderror
                                </div>

                                <div class="form-group mb-3" id="is_confirm_password">
                                    <div class="input-group" id="show_hide_password">
                                        <div class="input-group-prepend">
                                            <span class="input-group-text bg-transparent"><i class="fas fa-lock"></i></span>
                                        </div>
                                        <input type="password" name="password_confirmation"
                                               class="form-control login-form signin-input @error('password') border-danger @enderror"
                                               id="password" aria-label="password" placeholder="Confirm password"
                                               value="{{old('password_confirmation')}}" autocomplete="off">
                                        <div class="input-group-prepend passwordToText">
                                    <span class="input-group-text bg-transparent"><i class="bi bi-eye-slash"></i>
                                    </span>
                                        </div>

                                    </div>
                                    @error('password_confirmation')
                                    <div class="text-danger text-start">{{ $message }}</div>
                                    @enderror
                                </div>

                                <button type="submit" class="btn btn-primary mt-10">{{__('Generate Password')}}</button>


                                <div id="forgot-email" class="col-md-12 d-inline-flex justify-content-center">
                                    <p style="margin-right: 10px;">{{__('Need any help ')}}?</p>
                                    <p>Click <a class="terms" href="{{ route('faq') }}">{{__('here')}}</a></p>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection
