@extends('layouts.auth')

@section('title', 'Register')

@section('content')
    <h1>Create your account</h1>
    <p class="subtitle">Join Web3 Derp and start trading perpetuals today</p>

    <form method="POST" action="{{ route('register') }}">
        @csrf

        <div class="form-group">
            <label for="name">Full name</label>
            <input id="name" type="text" name="name" class="form-control"
                   value="{{ old('name') }}" required autofocus autocomplete="name"
                   placeholder="John Doe">
            @error('name')
                <p class="error-text">{{ $message }}</p>
            @enderror
        </div>

        <div class="form-group">
            <label for="email">Email address</label>
            <input id="email" type="email" name="email" class="form-control"
                   value="{{ old('email') }}" required autocomplete="username"
                   placeholder="you@example.com">
            @error('email')
                <p class="error-text">{{ $message }}</p>
            @enderror
        </div>

        <div class="form-group">
            <label for="password">Password</label>
            <input id="password" type="password" name="password" class="form-control"
                   required autocomplete="new-password" placeholder="••••••••">
            @error('password')
                <p class="error-text">{{ $message }}</p>
            @enderror
        </div>

        <div class="form-group">
            <label for="password_confirmation">Confirm password</label>
            <input id="password_confirmation" type="password" name="password_confirmation"
                   class="form-control" required autocomplete="new-password" placeholder="••••••••">
        </div>

        <button type="submit" class="btn btn-primary btn-block">Create account</button>
    </form>

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