@extends('masterAdmin')

@section('content')
<div class="clearfix">
    <div class="full-width-container login-body">
        <header class="header">
            <div class="header--center">
                <h1 class="h1">ĐĂNG NHẬP HỆ THỐNG</h1>
            </div>
        </header>
        <main class="login-container">
            <form action="{{route('login')}}" method="POST" class="login-form">
                <img class="login-form-logo" src="{{asset('assets')}}/img/icons/logo.png">
                <hr>
                <p class="login-title">Đăng nhập</p>
                <input type="text" placeholder="Tên đăng nhập" name="tenDangNhap" class="login-form--input" size="0">
                @error('tenDangNhap')
                    <div class="error-mess">{{ $message }}</div>
                @enderror
                <input type="password" placeholder="Mật khẩu" name="matKhau" class="login-form--input" size="0">
                @error('matKhau')
                    <div class="error-mess">{{ $message }}</div>
                @enderror
                <div class="g-recaptcha-outer">
                    <div class="g-recaptcha-inner capcha">
                        <div class="g-recaptcha" data-sitekey="{{ env('CAPTCHA_KEY') }}"></div>
                    </div>
                    @error('g-recaptcha-response')
                            <div class="error-mess">{{ $message }}</div>
                    @enderror
                @if(Session::has('error'))
                    <div class="error-mess">{{ Session::get('error') }}</div>
                @endif
                <input type="submit" value="Đăng nhập" class="login-form--submit">
                <a href="{{route('quenmatkhau')}}" class="login-form--forgot-password">Quên mật khẩu</a>
                @csrf
            </form>
        </main>
    </div>
</div>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
@endsection
