@extends('layouts.auth')

@section('title')
    Create Store
@endsection

@section('content')

<section class="md:h-auto py-36 flex items-center bg-orange-500/10 dark:bg-orange-500/20 bg-[url('../../assets/images/hero/bg-shape.html')] bg-center bg-no-repeat bg-cover">
    <div class="container relative">
        <div class="grid grid-cols-1">
            <div class="relative overflow-hidden bg-white rounded-md shadow dark:shadow-gray-700 dark:bg-slate-900">
                <div class="grid items-center grid-cols-1 md:grid-cols-2">
                    <div class="relative md:shrink-0">
                        <img class="lg:h-full h-52 w-full object-cover md:h-[34rem]" src="{{ asset('images/auth-1.jpg') }}" alt="">
                    </div>

                    <div class="p-8 lg:px-20">
                        <div class="text-center">
                            <a href="{{ url('/') }}">
                                <img src="{{ asset('images/logo-dark.png') }}" style="height: 40px;" class="block mx-auto dark:hidden" alt="">
                                <img src="{{ asset('images/logo.png') }}" style="height: 40px;" class="hidden mx-auto dark:block" alt="">
                            </a>
                        </div>

                        <div class="pt-6">
                            <p class="font-semibold mb-3">Create Your <span class="text-orange-500">Arbitrage Store</span></p>
                            <hr>
                        </div>

                        <form class="py-8 text-start lg:py-12" method="POST" action="{{ route('register') }}">
                            @csrf
                            <div class="grid grid-cols-1">
                                <div class="mb-4">
                                    <label class="font-semibold" for="LoginEmail">First Name:</label>
                                    <input id="first_name" name="first_name" type="text" class="w-full h-10 px-3 py-2 mt-3 bg-transparent border border-gray-100 rounded outline-none dark:bg-slate-900 dark:text-slate-200 dark:border-gray-800 focus:ring-0" placeholder="First Name">
                                    @error('email')
                                        <span class="mx-auto text-red-600 invalid-feedback" role="alert">
                                            <small class="text-center">{{ $message }}</small>
                                        </span>
                                    @enderror
                                </div>

                                <div class="mb-4">
                                    <label class="font-semibold" for="LoginEmail">Last Name:</label>
                                    <input id="last_name" name="last_name" type="text" class="w-full h-10 px-3 py-2 mt-3 bg-transparent border border-gray-100 rounded outline-none dark:bg-slate-900 dark:text-slate-200 dark:border-gray-800 focus:ring-0" placeholder="Last Name">
                                    @error('last_name')
                                        <span class="mx-auto text-red-600 invalid-feedback" role="alert">
                                            <small class="text-center">{{ $message }}</small>
                                        </span>
                                    @enderror
                                </div>

                                <div class="mb-4">
                                    <label class="font-semibold" for="LoginEmail">Email Address:</label>
                                    <input id="LoginEmail" name="email" type="email" class="w-full h-10 px-3 py-2 mt-3 bg-transparent border border-gray-100 rounded outline-none dark:bg-slate-900 dark:text-slate-200 dark:border-gray-800 focus:ring-0" placeholder="name@example.com">
                                    @error('email')
                                        <span class="mx-auto text-red-600 invalid-feedback" role="alert">
                                            <small class="text-center">{{ $message }}</small>
                                        </span>
                                    @enderror
                                </div>

                                <div class="mb-4">
                                    <label class="font-semibold" for="LoginPassword">Password:</label>
                                    <input id="LoginPassword" type="password" name="password" class="w-full h-10 px-3 py-2 mt-3 bg-transparent border border-gray-100 rounded outline-none dark:bg-slate-900 dark:text-slate-200 dark:border-gray-800 focus:ring-0" placeholder="Password:">
                                    @error('password')
                                        <span class="mx-auto text-red-600 invalid-feedback" role="alert">
                                            <small class="text-center">{{ $message }}</small>
                                        </span>
                                    @enderror
                                </div>
                                
                                <div class="mb-4">
                                    <label class="font-semibold" for="LoginPassword">Confirm Password:</label>
                                    <input id="password_confirmation" type="password" name="password_confirmation" class="w-full h-10 px-3 py-2 mt-3 bg-transparent border border-gray-100 rounded outline-none dark:bg-slate-900 dark:text-slate-200 dark:border-gray-800 focus:ring-0" placeholder="Password:">
                                    @error('password_confirmation')
                                        <span class="mx-auto text-red-600 invalid-feedback" role="alert">
                                            <small class="text-center">{{ $message }}</small>
                                        </span>
                                    @enderror
                                </div>

                                <div class="mb-4">
                                    <label class="font-semibold" for="LoginEmail">Referral Code (Optional):</label>
                                    <input id="referral_code" name="referral_code" type="text" value="@if(session('referrer') !== null) {{ session()->pull('referrer') }} @endif" class="w-full h-10 px-3 py-2 mt-3 bg-transparent border border-gray-100 rounded outline-none dark:bg-slate-900 dark:text-slate-200 dark:border-gray-800 focus:ring-0" placeholder="Referral Code (Optional)">
                                    @error('referral_code')
                                        <span class="mx-auto text-red-600 invalid-feedback" role="alert">
                                            <small class="text-center">{{ $message }}</small>
                                        </span>
                                    @enderror
                                </div>

                                <div class="mb-4">
                                    <div class="flex items-center w-full mb-0">
                                        <input class="text-orange-500 border-gray-100 rounded form-checkbox dark:border-gray-800 focus:border-orange-300 focus:ring focus:ring-offset-0 focus:ring-orange-200 focus:ring-opacity-50 me-2" type="checkbox" value="" id="AcceptT&C" required>
                                        <label class="form-check-label text-slate-400" for="AcceptT&C">I accept the <a href="{{ route('terms-of-service') }}" class="text-orange-500">Terms Of Use</a> & <a href="{{ route('privacy-policy') }}" class="text-orange-500">Privacy Policy</a></label>
                                    </div>
                                </div>
                                
                                 <div class="mb-4">
                                    <div class="form-group">
                                        <strong>ReCaptcha:</strong>
                                        <div class="g-recaptcha" data-sitekey="{{ config('services.recaptcha.key') }}" data-action="LOGIN"></div>
                                        @if ($errors->has('g-recaptcha-response'))
                                            <span class="mx-auto text-red-600 invalid-feedback" role="alert">
                                            <small class="text-center">{{ $errors->first('g-recaptcha-response') }}</small>
                                        </span>
                                        @endif

                                    </div>  
                                </div>

                                <div class="mb-4">
                                    <input type="submit" class="inline-block w-full px-5 py-2 text-base tracking-wide text-center text-white align-middle duration-500 bg-orange-500 rounded-md cursor-pointer" value="Sign Up">
                                </div>

                                <div class="text-center">
                                    <span class="text-slate-400 me-2">Already have an account?</span> <a href="{{ route('login') }}" class="inline-block font-bold text-black dark:text-white">Sign In</a>
                                </div>
                            </div>
                        </form>

                        <div class="text-center">
                            <p class="mb-0 text-slate-400">© <script>document.write(new Date().getFullYear())</script> Global Ecommerce Arbitrage Store.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section><!--end section -->

@endsection
