@php
$customizerHidden = 'customizer-hide';
$configData = Helper::appClasses();
@endphp

@extends('layouts/blankLayout')

@section('title', 'Register Page')

@section('page-style')
{{-- Page Css files --}}
<link rel="stylesheet" href="{{ asset(mix('assets/vendor/css/pages/page-auth.css')) }}">
@endsection

@section('content')
<div class="authentication-wrapper authentication-cover authentication-bg">
    <div class="authentication-inner row">
        <!-- /Left Text -->
        <div class="d-none d-lg-flex col-lg-7 p-0">
            <div class="auth-cover-bg auth-cover-bg-color d-flex justify-content-center align-items-center">
                <img src="{{ asset('assets/img/illustrations/auth-register-illustration-'.$configData['style'].'.png') }}"
                    alt="auth-register-cover" class="img-fluid my-5 auth-illustration"
                    data-app-light-img="illustrations/auth-register-illustration-light.png"
                    data-app-dark-img="illustrations/auth-register-illustration-dark.png">

                <img src="{{ asset('assets/img/illustrations/bg-shape-image-'.$configData['style'].'.png') }}"
                    alt="auth-register-cover" class="platform-bg"
                    data-app-light-img="illustrations/bg-shape-image-light.png"
                    data-app-dark-img="illustrations/bg-shape-image-dark.png">
            </div>
        </div>
        <!-- /Left Text -->

        <!-- Register -->
        <div class="d-flex col-12 col-lg-5 align-items-center p-sm-5 p-4">
            <div class="w-px-400 mx-auto">
                <!-- Logo -->
                <div class="app-brand mb-4">
                    <a href="{{url('/')}}" class="app-brand-link gap-2">
                        <span class="app-brand-logo demo">@include('_partials.macros',["height"=>20,"withbg"=>'fill:
                            #fff;'])</span>
                    </a>
                </div>
                <!-- /Logo -->
                <h3 class="mb-1">Avantura počinje ovdje 🚀</h3>
                <p class="mb-4">Napravi svoj račun i zgrabi nagrade!</p>

                <form id="formAuthentication" class="mb-3" action="{{ route('register') }}" method="POST">
                    @csrf
                    <div class="mb-3">
                        <label for="username" class="form-label">Korisničko ime</label>
                        <input type="text" class="form-control @error('name') is-invalid @enderror" id="username"
                            name="name" placeholder="nekonekic" autofocus value="{{ old('name') }}" />
                        @error('name')
                        <span class="invalid-feedback" role="alert">
                            <span class="fw-medium">{{ $message }}</span>
                        </span>
                        @enderror
                    </div>
                    <div class="mb-3">
                        <label for="email" class="form-label">Email</label>
                        <input type="text" class="form-control @error('email') is-invalid @enderror" id="email"
                            name="email" placeholder="nekonekic@gmail.com" value="{{ old('email') }}" />
                        @error('email')
                        <span class="invalid-feedback" role="alert">
                            <span class="fw-medium">{{ $message }}</span>
                        </span>
                        @enderror
                    </div>
                    <div class="mb-3 form-password-toggle">
                        <label class="form-label" for="password">Lozinka</label>
                        <div class="input-group input-group-merge @error('password') is-invalid @enderror">
                            <input type="password" id="password"
                                class="form-control @error('password') is-invalid @enderror" name="password"
                                placeholder="&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;"
                                aria-describedby="password" />
                            <span class="input-group-text cursor-pointer">
                                <i class="ti ti-eye-off"></i>
                            </span>
                        </div>
                        @error('password')
                        <span class="invalid-feedback" role="alert">
                            <span class="fw-medium">{{ $message }}</span>
                        </span>
                        @enderror
                    </div>

                    <div class="mb-3 form-password-toggle">
                        <label class="form-label" for="password-confirm">Potvrdi lozinku</label>
                        <div class="input-group input-group-merge">
                            <input type="password" id="password-confirm" class="form-control"
                                name="password_confirmation"
                                placeholder="&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;&#xb7;"
                                aria-describedby="password" />
                            <span class="input-group-text cursor-pointer">
                                <i class="ti ti-eye-off"></i>
                            </span>
                        </div>
                    </div>
                    @if (Laravel\Jetstream\Jetstream::hasTermsAndPrivacyPolicyFeature())
                    <div class="mb-3">
                        <div class="form-check @error('terms') is-invalid @enderror">
                            <input class="form-check-input @error('terms') is-invalid @enderror" type="checkbox"
                                id="terms" name="terms" />
                            <label class="form-check-label" for="terms">
                                Prihvatam
                                <a href="{{ route('policy.show') }}" target="_blank">uslove korištenja</a> i
                                <a href="{{ route('terms.show') }}" target="_blank">zaštita podataka</a>
                            </label>
                        </div>
                        @error('terms')
                        <div class="invalid-feedback" role="alert">
                            <span class="fw-medium">{{ $message }}</span>
                        </div>
                        @enderror
                    </div>
                    @endif
                    <button type="submit" class="btn btn-primary d-grid w-100">Registruj se</button>
                </form>

                <p class="text-center mt-2">
                    <span>Već imaš račun?</span>
                    @if (Route::has('login'))
                    <a href="{{ route('login') }}">
                        <span>Prijavi se</span>
                    </a>
                    @endif
                </p>

            </div>
        </div>
    </div>
    <!-- /Register -->
</div>
</div>
@endsection