@extends('admin.layouts.layout')

@section('container_content')

    <form method="POST" action="{{ route('admin_login') }}" onsubmit="LoginForm(this)" >
        @CSRF
        <section class="login-pg">
            <div class="content">
                <div class="row gx-0">
                    <div class="col-lg-6">
                        <div class="logo-side">
                            <a href="#" class="logo">
                                <img src="{{url('')}}/assets/admin/images/logo.png" alt="">
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="form-side">
                            <div  class="form col-lg-8">
                                @if (session('error'))
                                    <div class="alert alert-danger">
                                        {{ session('error') }}
                                        {{ session()->forget('error') }}
                                    </div>
                                @endif

                                @if (session('suspended_error'))
                                    <div class="alert alert-danger">
                                        {{ session('suspended_error') }}
                                        {{ session()->forget('suspended_error') }}
                                    </div>
                                @endif
                                <div class="title-wrapper">
                                    <h3> {{__('dashboard.welcome_back')}} </h3>
                                    <div class="text"> {{__('dashboard.login_continue')}} </div>
                                </div>
                                <div class="form-group">
                                    <div class="txt mb-2"> {{__('dashboard.email')}}</div>
                                    <input type="text" name="email" id="email" value="{{ old('email') }}" class="form-control @error('email') is-invalid @enderror" placeholder="{{__('dashboard.enter_email')}}">

                                    @error('email')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>

                                <div class="form-group show_hide_password mb-2">
                                    <div class="txt mb-2"> {{__('dashboard.password')}} </div>
                                    <input type="password" name="password" id="password" class="form-control @error('password') is-invalid @enderror" placeholder="{{__('dashboard.enter_password')}}">
                                    <i class="show_pass far fa-eye-slash"></i>

                                    @error('password')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>

                                <div class="form-group mb-3">
                                    <button type="submit" class="butn-st2 w-100"> <span> {{__('dashboard.login')}} </span> </button>
                                </div>
                                <div class="text mt-5"> ©2024 SKYBRIDGE. All rights reserved </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <div class="modal fade modal-add-contact" id="password_modal" tabindex="-1" aria-labelledby="exampleModalLabel"
             aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered modal-md">
                <div class="modal-content" id="">


                    <div class="modal-header">
                        <h1 class="modal-title fs-6" id="exampleModalLabel"> <i class="fal fa-user me-1"></i> New Password </h1>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <div class="modal-body">
                        <div class="modal-form">
                            <div class="row">

                                <div class="col-lg-12">
                                    <div class="form-group mb-3">
                                        <label for="" class="d-block mb-2"> {{ __('users.password') }} </label>
                                        <input type="password" name="new_password" class="form-control" placeholder="{{ __('users.password') }}">
                                    </div>
                                </div>


                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="line-butn butn-st2 butn-md" data-bs-dismiss="modal" aria-label="Close"><span> {{ __('dashboard.cancel') }} </span></button>
                        <button type="submit" class="blue-butn butn-st2 butn-md"><span> {{ __('dashboard.save') }} </span></button>
                    </div>


                </div>
            </div>
        </div>
    </form>
<!--End-Contents-->
@endsection
