<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <title>Нарушением.Нет</title>
    <link href="<?php echo e(asset('public/assets/css/auth.css')); ?>" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js" integrity="sha384-j1CDi7MgGQ12Z7Qab0qlWQ/Qqz24Gc6BM0thvEMVjHnfYGF0rmFCozFSxQBxwHKO" crossorigin="anonymous"></script>

</head>

<body>
    <div class="container">
        <form id="login-form" method="POST" action="<?php echo e(Route('log')); ?>">
        <?php echo csrf_field(); ?>
            <h2>Авторизация</h2>
            <div class="form-group form-floating mb-3">
                <input type="email" class="form-control" id="login-email floatingInput" name="email"
                    placeholder="Email" required>
                <label for="floatingInput">Email</label>
                <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="alert alert-danger"><?php echo e($message); ?></div>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>
            <div class="form-group form-floating mb-3">
                <input type="password" class="form-control" id="login-password floatingInput" name="password"
                    placeholder="Пароль" required>
                <label for="floatingInput">Пароль</label>
                <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="alert alert-danger"><?php echo e($message); ?></div>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>
            <button type="submit">Войти</button>
            <div class="switch-form">
                Нет аккаунта? <a href="#" onclick="showRegistrationForm()">Зарегистрироваться</a>
            </div>
        </form>


        <form id="registration-form" style="display: none;" method="POST" action="<?php echo e(Route('reg')); ?>">
            <?php echo csrf_field(); ?>
            <h2>Регистрация</h2>
            <div class="form-group form-floating mb-3">
                <input type="name" class="form-control" id="register-fullname floatingInput" name="fullname"
                    placeholder="Фамилия" required>
                <label for="floatingInput">Фамилия</label>
            </div>
            <div class="form-group form-floating mb-3">
                <input type="name" class="form-control" id="register-name floatingInput" name="name"
                    placeholder="Имя" required>
                <label for="floatingInput">Имя</label>
            </div>
            <div class="form-group form-floating mb-3">
                <input type="name" class="form-control" id="register-patronymic floatingInput" name="patronymic"
                    placeholder="Отчество" required>
                <label for="floatingInput">Отчество</label>
            </div>
            <div class="form-group form-floating mb-3">
                <input type="tel"  class="form-control" id="register-numberphone floatingInput" name="numberphone"
                    placeholder="+79000000000" required>
                <label for="floatingInput">Номер телефона (Пример: +79000000000)</label>
            </div>
            <div class="form-group form-floating mb-3">
                <input type="email" class="form-control" id="register-email floatingInput" name="email"
                    placeholder="Email" required>
                <label for="floatingInput">Email</label>
                <?php $__errorArgs = ['emailreg'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="alert alert-danger"><?php echo e($message); ?></div>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

            </div>
            <div class="form-group form-floating mb-3">
                <input type="password" class="form-control" id="register-password floatingInput" name="password"
                    placeholder="Пароль" required>
                <label for="floatingInput">Пароль</label>
            </div>
            <div class=" form-group btn-group" role="group" aria-label="Basic radio toggle button group">
                <p>Выберите роль:</p>
                &nbsp;
                <div>
                    <select class="btn-check"  >
                        <option value="user" class="btn btn-outline-primary">Пользователь</option>
                        <option value="admin" class="btn btn-outline-primary">Администратор</option>
                    </select>
                    <input type="radio" class="btn-check" name="role" id="btnradio1" value='user' autocomplete="off" checked>
                    <label class="btn btn-outline-primary" for="btnradio1">Пользователь</label>
                    <input type="radio" class="btn-check" name="role" id="btnradio3" autocomplete="off" value='admin'>
                    <label class="btn btn-outline-success" for="btnradio3">Администратор</label>
                </div>
            </div>
            <button type="submit">Зарегистрироваться</button>
            <div class="switch-form">
                Уже есть аккаунт? <a href="#" onclick="showLoginForm()">Войти</a>
            </div>
        </form>

    </div>

    <script>
        function showLoginForm() {
            document.getElementById('login-form').style.display = 'block';
            document.getElementById('registration-form').style.display = 'none';
        }

        function showRegistrationForm() {
            document.getElementById('login-form').style.display = 'none';
            document.getElementById('registration-form').style.display = 'block';
        }
    </script>


</body>

</html>
<?php /**PATH C:\xampp\htdocs\narushnet\resources\views/login.blade.php ENDPATH**/ ?>