1import{u as x,a as h,r as s,j as t,m as b,b as e,E as y,L as l}from"./index-f6c41174.js";import{c as v,a as d,F as w,b as N,d as F}from"./FloatingInput-e2bf3495.js";import{F as S}from"./FloatingPasswordInput-1bf1a5da.js";import{F as E}from"./FormAppInfo-ed7c81c6.js";import{G as L}from"./GoogleLoginBtn-a4b234f6.js";import"./_commonjsHelpers-725317a4.js";const P={email:"",password:""},I=v().shape({email:d().email("Invalid Email Address").required("Required"),password:d().min(6,"Password must be 6 charcters at minimum").max(30,"Password is too big!").required("Required")});function G(){const{login:c,currentUser:i}=x();let r=h();const o=s.useRef(null),[m,g]=s.useState(null);async function u(a,j){console.log("login started!");const{email:p,password:f}=a;try{await c(p,f),console.log("logged in successfully"),r("/app")}catch(n){g(n.message),o.current.show(),console.log(n)}}return s.useEffect(()=>{i&&r("/app")},[i]),t(b.div,{intial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.2}},className:"bg-black",children:[e(y,{message:m,ref:o}),t("div",{className:"grid grid-cols-1 lg:grid-cols-2 bg-black text-white ",children:[t("div",{className:"w-full h-screen py-20 lg:py-32 px-4 mx-auto xl:py-32 md:w-3/5 lg:w-4/5 xl:w-3/5",children:[t("h1",{className:"mb-8 -mt-3 text-2xl font-title font-extrabold leading-snug text-left text-green-400 md:text-4xl font-title tracking-wide",children:["Log In"," "]}),e(w,{initialValues:P,onSubmit:u,validationSchema:I,validateOnMount:!0,children:a=>t(N,{autoComplete:"off",className:"divide-y divide-gray-200",children:[t("div",{className:"font-text text-base leading-6 space-y-5 text-gray-700 sm:text-lg sm:leading-7",children:[e(F,{id:"email",name:"email",type:"email",placeholder:"Email address"}),e(S,{id:"password",name:"password",type:"password",placeholder:"Password"}),e(l,{to:"/forgotPassword",className:"text-sm ",children:t("p",{className:`font-medium text-[#1ed760] hover:text-[#1db954]\r 2 mt-4`,children:[" ","Forgot Password?"]})})]}),e("div",{className:"mt-8",children:e("button",{type:"submit",disabled:!a.isValid||a.isSubmitting,"aria-label":"create my account",className:`focus:ring-2 font-text 3 ${(!a.isValid||a.isSubmitting)&&" focus:ring-gray-700 bg-gray-700 border hover:bg-gray-600"} focus:ring-offset-2 focus:ring-green-600 text-sm font-bold leading-none text-white focus:outline-none bg-green-600 border rounded hover:bg-green-600 py-4 w-full `,children:a.isSubmitting?"Logging You In...":"Login To My Account"})})]})}),e(l,{to:"/signup",className:"text-md my-8 flex justify-center",children:t("p",{className:"font-medium text-[#1ed760] hover:text-[#1db954] font-title",children:[" ","Don't have an account? Signup"]})}),t("div",{className:"relative my-4",children:[e("div",{className:"absolute inset-0 flex items-center",children:e("div",{className:"w-full border-t border-gray-300"})}),e("div",{className:"relative flex justify-center text-sm",children:e("span",{className:"px-2 bg-black text-gray-100",children:" Or continue with "})})]}),e("div",{className:"mt-8 space-y-4",children:e(L,{})})]}),e(E,{})]})]})}export{G as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.