<!DOCTYPE html>
<html lang="zxx" class="js">

<head>
    <meta charset="utf-8">
    <meta name="author" content="{{ ucwords(strtolower(config('settings.site_name'))) }}">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="{{ ucwords(strtolower(config('settings.site_desc'))) }}">
    <!-- Fav Icon  -->
    <link rel="shortcut icon" href="/images/favicon.png">
    <!-- Page Title  -->
    <title>Online Application | {{ ucwords(strtolower(config('settings.site_name'))) }}</title>
    <!-- StyleSheets  -->
    <link rel="stylesheet" href="/assets/css/dashlite.css?ver=2.4.0">
    <link id="skin-default" rel="stylesheet" href="/assets/css/theme.css?ver=2.4.0">
    <link rel="stylesheet" href="/assets/css/catalyst.css">
</head>

<body class="nk-body bg-white npc-general pg-auth" id="catalyst-root">
    <div class="page-cover"></div>
    <div id="page-loader" class="fade show">
        <div class="d-flex justify-content-center center-screen">
            <span class="spin"></span>
        </div>
    </div>
    <div class="nk-app-root">
        <!-- main  -->
        <div class="nk-main ">
            <!-- wrap  -->
            <div class="nk-wrap nk-wrap-nosidebar">
                <!-- content -->
                <div class="nk-content ">
                    <a name="step-one"></a>
                    <a name="step-two"></a>
                    <a name="step-three"></a>
                    <div class="nk-block nk-block-middle nk-auth-body wide-md">
                        <div class="brand-logo pb-4 text-center">
                            <a href="/" class="logo-link">
                                <img class="logo-light logo-img logo-img-lg" src="/images/logo.png?{{ rand(1,999999) }}" srcset="/images/logo.png?{{ rand(1,999999) }}" alt="logo">
                                <img class="logo-dark logo-img logo-img-lg" src="/images/logo.png?{{ rand(1,999999) }}" srcset="/images/logo.png?{{ rand(1,999999) }}" alt="logo-dark">
                            </a>
                        </div>
                        <div class="card card-bordered final">
                            <div class="card-inner card-inner-lg">
                                <div class="step-two">
                                    <div class="nk-block-head">
                                        <div class="nk-block-head-content">
                                            <h4 class="nk-block-title">Online Banking Application Form</h4>
                                        </div>
                                    </div>
                                    <form id="register-formData" method="POST" class="form-validate is-alter">
                                        @csrf
                                        @if($errors->any())
                                            <div class="alert alert-icon alert-danger" role="alert">
                                                <em class="icon ni ni-alert-circle"></em>
                                                <strong>Oops!</strong> {{ $errors->first() }}.
                                            </div>
                                        @endif
                                        <div class="row g-gs">
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">First Name</label>
                                                    <input type="text" class="form-control form-control-lg" name="firstname" value="{{ old('firstname') }}" placeholder="Enter your first name" >
                                                    @error('firstname')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>

                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Middle Name <small>(Optional)</small></label>
                                                    <input type="text" class="form-control form-control-lg" name="middlename" value="{{ old('middlename') }}"   placeholder="Enter your middle name">
                                                    @error('middlename')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Last Name</label>
                                                    <input type="text" class="form-control form-control-lg" name="lastname" value="{{ old('lastname') }}"   placeholder="Enter your last name" >
                                                    @error('lastname')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Email Address</label>
                                                    <input type="email" class="form-control form-control-lg" name="email"  value="{{ old('email') }}"   placeholder="Enter your email address" >
                                                    @error('email')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Username</label>
                                                    <input type="text" class="form-control form-control-lg" name="username" value="{{ old('username') }}"   placeholder="Enter your username" >
                                                    @error('username')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label" for="password">Password</label>
                                                    <div class="form-control-wrap">
                                                        <a href="#" class="form-icon form-icon-right passcode-switch" data-target="password" >
                                                            <em class="passcode-icon icon-show icon ni ni-eye"></em>
                                                            <em class="passcode-icon icon-hide icon ni ni-eye-off"></em>
                                                        </a>
                                                        <input type="password" class="form-control form-control-lg" name="password" id="password" value="{{ old('password') }}"   placeholder="Enter your password" >
                                                    </div>
                                                    @error('password')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Phone Number</label>
                                                    <input type="text" class="form-control form-control-lg" name="phone_number" value="{{ old('phone_number') }}"   placeholder="Eg +1234567890" >
                                                    @error('phone_number')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Occupation</label>
                                                    <input type="text" class="form-control form-control-lg" name="occupation" value="{{ old('occupation') }}"   placeholder="Eg. Sales Man" >
                                                    @error('occupation')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Date of birth</label>
                                                    <div class="form-control-wrap">
                                                        <input type="text" class="form-control date-picker-alt"name="date_of_birth" value="{{ old('date_of_birth') }}"   placeholder="Eg. 01/13/1994" >
                                                    </div>
                                                    <div class="form-note">Date format <code>mm/dd/yyyy</code></div>
                                                    @error('date_of_birth')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Gender</label>
                                                    <div class="form-control-wrap">
                                                        <select name="gender" class="form-select" data-placeholder="--Please Select--" >
                                                            <option @if(old('gender') == 'Male') selected @endif>Male</option>
                                                            <option @if(old('gender') == 'Female') selected @endif>Female</option>
                                                        </select>
                                                    </div>
                                                    @error('gender')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Home Address</label>
                                                    <input type="text" class="form-control form-control-lg" name="address" value="{{ old('address') }}"   placeholder="Eg. 14 Burr Salivani" >
                                                    @error('address')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">State</label>
                                                    <input type="text" class="form-control form-control-lg" name="state" value="{{ old('state') }}"   placeholder="United Kingdom" >
                                                    @error('state')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Country</label>
                                                    <select class="form-select form-control form-control-lg" data-search="on" name="country" id="country" data-placeholder="--Select Country--" required>
                                                            @foreach (all_countries() as $key => $country)
                                                                <option value="{{ strtoupper($key) }}" @if (old('country') == $country) selected @endif>{{ $country }}</option>
                                                            @endforeach
                                                    </select>
                                                    @error('country')
                                                            <span class="text-danger ff-italic">{{ $message }}</span>
                                                        @enderror
                                                    </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Zip Code</label>
                                                    <input type="text" class="form-control form-control-lg" name="zip" value="{{ old('zip') }}" placeholder="Enter your zip code" >
                                                    @error('zip')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Currency</label>
                                                    <div class="form-control-wrap">
                                                        <select name="account_currency" class="form-select" data-placeholder="--Please Select--" >
                                                            @foreach (all_currencies() as $currency)
                                                                <option value="{{ $currency->symbol }}"
                                                                    @if (old('account_type')== $currency->symbol)
                                                                        selected
                                                                    @endif
                                                                    >{{ $currency->name }}
                                                                </option>
                                                            @endforeach
                                                        </select>
                                                    </div>
                                                    @error('account_currency')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Account Type</label>
                                                    <div class="form-control-wrap">
                                                        <select name="account_type" class="form-select" data-placeholder="--Please Select--" >
                                                            @foreach (account_types() as $account_type)
                                                                <option value="{{ $account_type->name }}"
                                                                    @if (old('account_currency')== $account_type->name)
                                                                        selected
                                                                    @endif>{{ $account_type->name }}
                                                                </option>
                                                            @endforeach
                                                        </select>
                                                    </div>
                                                    @error('account_type')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            {{-- <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Account Pin (4 digits)</label>
                                                    <input type="password" class="form-control form-control-lg" minlength=4 maxlength=4 name="pin" inputmode="numeric"  value="{{ old('pin') }}"  placeholder="****" >
                                                    @error('pin')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div> --}}
                                            <div class="col-12">
                                                <span class="lead">ADDITIONAL INFORMATION<small>(Optional)</small></span>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Next of Kin Name</label>
                                                    <input type="text" class="form-control form-control-lg" name="next_of_kin_name"  value="{{ old('next_of_kin_name') }}"  placeholder="Enter name of your next of kin" >
                                                    @error('next_of_kin_name')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Next of Kin Address</label>
                                                    <input type="text" class="form-control form-control-lg" name="next_of_kin_address" value="{{ old('next_of_kin_address') }}"  placeholder="Enter address of your next of kin" >
                                                    @error('next_of_kin_address')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Next of Kin Phone</label>
                                                    <input type="text" class="form-control form-control-lg" name="next_of_kin_phone" value="{{ old('next_of_kin_phone') }}"  placeholder="Eg. +1234567890" >
                                                    @error('next_of_kin_phone')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="form-group">
                                                    <label class="form-label">Next of Kin Email Address</label>
                                                    <input type="email" class="form-control form-control-lg" name="next_of_kin_email" value="{{ old('next_of_kin_email') }}" placeholder="nextofkinmail.com" >
                                                    @error('next_of_kin_email')
                                                        <span class="text-danger ff-italic">{{ $message }}</span>
                                                    @enderror
                                                </div>
                                            </div>
                                            <div class="nk-pps-field form-action text-left">
                                                <div class="nk-pps-action">
                                                    <button class="btn btn-lg btn-lg btn-primary register-btn">
                                                        <span>Register</span>
                                                        <span class="spinner-border spinner-border-sm hide register-spinner"
                                                            style="display: none;" role="status" aria-hidden="true">
                                                        </span>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="error_message" class="mt-4"></div>
                                    </form>
                                    <div class="form-note-s2 text-center pt-4"> Already have an account? <a href="login"><strong>Sign in instead</strong></a></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="nk-footer nk-auth-footer-full">
                        <div class="container wide-lg">
                            <div class="row g-3">
                                <div class="col-lg-6 order-lg-last">
                                    <ul class="nav nav-sm justify-content-center justify-content-lg-end">
                                        <li class="nav-item">
                                            <a class="nav-link" href="#">Terms & Condition</a>
                                        </li>
                                        <li class="nav-item">
                                            <a class="nav-link" href="#">Privacy Policy</a>
                                        </li>
                                        <li class="nav-item">
                                            <a class="nav-link" href="#">Help</a>
                                        </li>
                                        <li class="nav-item"> <x-translator /> 
                                        </li>
                                        <li class="nav-item dropup">
                                            <a class="dropdown-toggle dropdown-indicator has-indicator nav-link" data-toggle="dropdown" data-offset="0,10"><span>English</span></a>
                                            <div class="dropdown-menu dropdown-menu-sm dropdown-menu-right">
                                                <ul class="language-list">
                                                    <li>
                                                        <a href="#" class="language-item">
                                                            <img src="/images/flags/english.png" alt="" class="language-flag">
                                                            <span class="language-name">English</span>
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="#" class="language-item">
                                                            <img src="/images/flags/spanish.png" alt="" class="language-flag">
                                                            <span class="language-name">Español</span>
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="#" class="language-item">
                                                            <img src="/images/flags/french.png" alt="" class="language-flag">
                                                            <span class="language-name">Français</span>
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a href="#" class="language-item">
                                                            <img src="/images/flags/turkey.png" alt="" class="language-flag">
                                                            <span class="language-name">Türkçe</span>
                                                        </a>
                                                    </li>
                                                </ul>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                                <div class="col-lg-6">
                                    <div class="nk-block-content text-center text-lg-left">
                                        <p class="text-soft">&copy; 2024 FiveMM Investment Group. All Rights Reserved.</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- wrap  -->
            </div>
            <!-- content  -->
        </div>
        <!-- main  -->
    </div>
    <!-- app-root  -->
    <!-- JavaScript -->
    <script src="/assets/js/bundle.js?ver=2.4.0"></script>
    <script src="/assets/js/scripts.js?ver=2.4.0"></script>
    <script src="/assets/js/custom.js?ver=0.1.5"></script>
    <script>
        $(document).ready(function(){
            @if (Session::has('success'))
                Swal.fire({
                    icon: 'success',
                    title: 'SUCCESS!',
                    message: session('success')
                });
            elseif(Session::has('error'))
                Swal.fire({
                    icon: 'error',
                    title: 'An Error Occured!',
                    message: session('error')
                });

            @endif
        });
    </script>
</body>
</html>
