@extends('layouts.guest')

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

@section('guest_tagline')
    {{ __('Create an account to get started') }}
@endsection

@section('content')
    <h2>{{ __('Register') }}</h2>
    <form method="POST" action="{{ route('register') }}" novalidate>
        @csrf

        <div class="field">
            <label for="name">{{ __('Name') }}</label>
            <input
                id="name"
                type="text"
                name="name"
                value="{{ old('name') }}"
                required
                autocomplete="name"
                autofocus
                @if($errors->has('name')) aria-invalid="true" aria-describedby="name-error" @endif
            >
            @error('name')
                <p class="error" id="name-error" role="alert">{{ $message }}</p>
            @enderror
        </div>

        <div class="field">
            <label for="email">{{ __('Email address') }}</label>
            <input
                id="email"
                type="email"
                name="email"
                value="{{ old('email') }}"
                required
                autocomplete="email"
                @if($errors->has('email')) aria-invalid="true" aria-describedby="email-error" @endif
            >
            @error('email')
                <p class="error" id="email-error" role="alert">{{ $message }}</p>
            @enderror
        </div>

        <div class="field">
            <label for="password">{{ __('Password') }}</label>
            <input
                id="password"
                type="password"
                name="password"
                required
                autocomplete="new-password"
                @if($errors->has('password')) aria-invalid="true" aria-describedby="password-error" @endif
            >
            @error('password')
                <p class="error" id="password-error" role="alert">{{ $message }}</p>
            @enderror
        </div>

        <div class="field">
            <label for="password-confirm">{{ __('Confirm password') }}</label>
            <input
                id="password-confirm"
                type="password"
                name="password_confirmation"
                required
                autocomplete="new-password"
            >
        </div>

        <button type="submit" class="btn-submit">{{ __('Create account') }}</button>

        <div class="guest-links">
            <a href="{{ route('login') }}">{{ __('Already have an account? Sign in') }}</a>
        </div>
    </form>
@endsection
