@extends('layouts.front-admin-layout')
@section('title') Admin Login
@endsection
@section('content')

    <div class="container-fluid mt-5">
        <div class="row">

            <div class=" col-md-6 col-sm-9 col-10 m-auto">
                <div class="text-center mt-5">
                    <a href="{{route('front.index')}}">
                    <div class="login-img">
                        <img src=" {{ isset($setting) ? $setting->settingImage('header_logo') : asset('upload/No-Image.png') }}"width="250">
                    </div>
                    <div class="login-logo">
                        <h2 class="text-muted">{{$setting->site_title ?? ''}}</h2>

                    </div>
                    </a>
                </div>

                <div class="card card-box-shadow">

                    <div class="card-body">
                        <h4 class="text-center text-muted mt-2">Admin Login</h4>
                        @if(Session::get('success'))
                            <div style="margin:auto; max-width:450px;">
                                <div class="alert alert-success alert-dismissible  fade show text-center">
                                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                                    {{Session::get('success')}}
                                </div>
                            </div>
                        @endif

                        @if(session::get('error'))
                            <div style="margin:auto; max-width:450px;">
                                <div class="alert alert-danger alert-dismissible  fade show text-center">
                                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                                    {{session::get('error')}}
                                </div>
                            </div>
                        @endif
                        <form method="POST" action="{{route('admin.login')}}">
                            @csrf


                            <div class="mb-3">
                                <label for="exampleInputEmail1" class="form-label">Email Address</label>
                                <input type="email" class="form-control form__field" name="email" placeholder="Enter Your Email">
                                <small class="text-danger">@error ('email') {{$message}} @enderror</small>

                            </div>
                            <div class="mb-3">
                                <label for="exampleInputPassword1" class="form-label">Password</label>
                                <input type="password" class="form-control form__field" name="password" placeholder="Enter Your Password">
                                <small class="text-danger">@error ('password') {{$message}} @enderror</small>

                            </div>

                            <div class='text-center'>
                                <button type="submit" class="btn btn-primary">Login</button>
                                <a href="{{route('admin.show-reset-password')}}" class="btn btn-primary">Reset Password
                                    Link</a>

                            </div>

                        </form>
                    </div>
                </div>
            </div>


        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->


@endsection
