@extends('web.layouts.container')
@section('breadcrumb')
    <nav class="nav-breadcrumb" aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{{LaravelLocalization::getLocalizedURL(getCurrentLocale(), url('/'), [], true)}}">{{__('main.home_page')}}</a></li>
            <li class="breadcrumb-item active" aria-current="page">{{__('main.login')}}</li>
        </ol>
    </nav>
@endsection

@section('content')
    <main>
        <!--start register-->
        <section class="register">
            <div class="container">
                <div class="col-lg-6 col-md-7 col-sm-12 col-xs-12 m-auto">
                    <div class="register-card ">
                        @if($errors->any())
                            <div class="alert alert-danger col-xs-12 mb-3 text-center">{{$errors->first()}}</div>
                        @endif
                        @if(session('message'))
                            <div class="alert alert-success col-xs-12 mb-3 text-center">{{session('message')}}</div>
                        @endif
                        <h5>{{__('main.login')}}</h5>
                        <form method="post" action="{{route('user.doLogin')}}">
                            @csrf()
                            <div class="row pt-5">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <div class="form-group">
                                        <input type="email" name="email" class="form-control @error('email') is-invalid @enderror" value="{{old('email')}}" autocomplete="off" />
                                        <label class="floating-label">{{__('users.email')}}</label>
                                        @error('email') <span class="text-danger">{{$message}}</span> @enderror
                                    </div>
                                </div>
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <div class="form-group">
                                        <input type="password" name="password" class="form-control @error('password') is-invalid @enderror" autocomplete="off" />
                                        <label class="floating-label">{{__('users.password')}}</label>
                                        <a class="forget-pass" href="{{route('user.forgetPassword')}}">{{__('users.forget_password_q')}}</a>
                                        @error('password') <span class="text-danger">{{$message}}</span> @enderror
                                    </div>
                                </div>
                            </div>
                            <button class="submit-btn" type="submit">{{__('main.login')}}</button>
                        </form>
                        <p class="sign">{{__('users.not_have_account')}} <a href="{{route('user.register')}}">{{__('users.register')}}</a></p>
{{--                        <div class="another-option">--}}
{{--                            <div class="or">--}}
{{--                                <p>أو</p>--}}
{{--                                <hr>--}}
{{--                            </div>--}}
{{--                            <div class="buttons">--}}
{{--                                <div class="row">--}}
{{--                                    <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">--}}
{{--                                        <button class="butn fb">--}}
{{--                                            <i class="fab fa-facebook-f"></i>--}}
{{--                                            Facebook--}}
{{--                                        </button>--}}
{{--                                    </div>--}}
{{--                                    <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">--}}
{{--                                        <button class="butn gm">--}}
{{--                                            <i class="fab fa-google-plus-g"></i>--}}
{{--                                            Gmail--}}
{{--                                        </button>--}}
{{--                                    </div>--}}
{{--                                </div>--}}
{{--                            </div>--}}
{{--                        </div>--}}
                    </div>
                </div>
            </div>
        </section>
    </main>
@endsection

@section('inner_js')
    <script>
        $(document).ready(function () {
            $('.navs-container').addClass('page-heading')
        })
    </script>
@endsection
