<x-head />
<x-header />
<br>
<section class="registration">
    <div class="container">
        <h2 class="text-center">Регистрация</h2>
        <form action="{{ route('reg') }}" method="post">
            @csrf
            <div class="mb-3">
                <label for="username" class="form-label">Имя пользователя</label>
                <input type="text" class="form-control" name="name">
                @error('name')
                <div class="text-danger">{{ $message }}</div>
                @enderror
            </div>
            <div class="mb-3">
                <label for="email" class="form-label">Электронная почта</label>
                <input type="email" class="form-control" name="email">
                @error('email')
                <div class="text-danger">{{ $message }}</div>
                @enderror
            </div>
            <div class="mb-3">
                <label for="password" class="form-label">Пароль</label>
                <input type="password" class="form-control" name="password">
                @error('password')
                <div class="text-danger">{{ $message }}</div>
                @enderror
            </div>
            <div class="mb-3">
                <select name="role">
                    <option value="user" selected>Пользователь</option>
                    <option value="admin">Администратор</option>
                </select>
            </div>
            <button type="submit" class="btn btn-outline-dark" style="border-radius: 40px;">Зарегистрироваться</button>
        </form>
        <p class="mt-3 text-center">Уже есть аккаунт? <a href="{{ route('login') }}">Войти</a></p>
    </div>
</section>

<x-footer />