@extends('layouts.blank', ['title' => 'Reset Password'])

@section('body')

    <div class="container flex items-center justify-center mt-20 py-10">
        <div class="w-full md:w-1/2 xl:w-1/3">

            @if($errors->has('email'))
                <div class="alert alert_danger mb-3">
                    <strong class="uppercase">
                        <bdi>Error!</bdi>
                    </strong>
                    {{$errors->first('email')}}
                    <button class="dismiss la la-times" data-dismiss="alert"></button>
                </div>
            @endif

                @if ($errors->any() && !$errors->has('email'))
                    <div class="alert alert_danger mb-3">
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                            @endforeach
                        </ul>
                        <button class="dismiss la la-times" data-dismiss="alert"></button>
                    </div>
                @endif


            <div class="mx-5 md:mx-10">
                <h2 class="uppercase">Reset Password</h2>
                <h4 class="uppercase">Reset your account password</h4>
            </div>
            <form class="card mt-5 p-5 md:p-10" method="post" action="{{route('password.update')}}">
                @csrf
                <input name="token" value="{{$token}}" hidden="hidden">
                <input name="email" value="{{$email}}" hidden="hidden">

                <div class="mb-5">
                    <label class="label block mb-2" for="new_password">New Password</label>
                    <label class="form-control-addon-within">
                        <input id="password" name="password" type="password" class="form-control border-none"
                               placeholder="new password" value="">
                        <span class="flex items-center ltr:pr-4 rtl:pl-4">
                            <button type="button"
                                    class="text-gray-300 dark:text-gray-700 la la-eye text-xl leading-none"
                                    data-toggle="password-visibility"></button>
                        </span>
                    </label>
                </div>

                <div class="mb-5">
                    <label class="label block mb-2" for="confirm_password">Confirm Password</label>
                    <label class="form-control-addon-within">
                        <input id="confirm_password" name="password_confirmation" type="password"
                               class="form-control border-none" placeholder="confirm password" value="">
                        <span class="flex items-center ltr:pr-4 rtl:pl-4">
                            <button type="button"
                                    class="text-gray-300 dark:text-gray-700 la la-eye text-xl leading-none"
                                    data-toggle="password-visibility"></button>
                        </span>
                    </label>
                </div>


                <div class="flex items-center">

                    <button class="btn btn_secondary btn_outlined uppercase" type="reset">Clear</button>
                    <button class="btn btn_primary ltr:ml-auto rtl:mr-auto uppercase" type="submit">Confirm</button>
                </div>

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

@endsection
