import React, { useEffect, useState } from 'react'
import LoginImg from '../../assets/bg/login.svg'

import BSMainLoader from '../loaders/BSMainLoader'
import { Link, useNavigate } from 'react-router-dom'
import siteLinks from '../../links/siteLinks'

export default function Forgetpwd2() {

  const [loading, setLoading] = useState(true)

  const navigate = useNavigate()

  useEffect(()=>{
    const timer = setTimeout(()=>{
        setLoading(false)
    },1000)

    return () => clearTimeout(timer)
  },[])

  return (
    <div className="bg-white">

        {loading ? 
        <BSMainLoader />
        :
        <div className="app">
            <div className="app-wrap">
                <div className="app-contant">
                    <div className="bg-white">
                        <div className="container-fluid p-0">
                            <div className="row no-gutters">
                                <div className="col-sm-6 col-lg-5 col-xxl-3  align-self-center order-2 order-sm-1">
                                    <div className="d-flex align-items-center h-100-vh">
                                        <div className="login p-50">
                                            <h1 className="mb-2">Recover Password</h1>
                                            <p>Please enter your email.</p>
                                            <form action="auth-login.html" className="mt-3 mt-sm-5">
                                                <div className="row">
                                                    <div className="col-12">
                                                        <div className="form-group">
                                                            <label className="control-label">Email*</label>
                                                            <input type="text" className="form-control" placeholder="Email" />
                                                        </div>
                                                    </div>
                                                    <div className="col-12 mt-3">
                                                        <button onClick={()=>{navigate(siteLinks.dash)}} className="btn btn-primary text-uppercase">Send</button>
                                                    </div>
                                                    <div className="col-12  mt-3">
                                                        <p>Go <Link to={siteLinks.home}> Back</Link></p>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                                <div className="col-sm-6 col-xxl-9 col-lg-7 bg-gradient o-hidden order-1 order-sm-2">
                                    <div className="row align-items-center h-100">
                                        <div className="col-7 mx-auto ">
                                            <img className="img-fluid" src={LoginImg} alt="" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        }
    </div>
  )
}
