import{A as L,D as m,E as R,F as B,K as o,t as E,v as a,x as n,y as i}from"/admin/build/_shared/chunk-23T7FBRJ.js";import{a as M,s as F,u as x,y as h}from"/admin/build/_shared/chunk-A7Z7N7I3.js";import{b as k,d as s}from"/admin/build/_shared/chunk-VGRMLH5W.js";var A=k((P,I)=>{I.exports={}});var t=s(M());var C=s(A()),e=s(h());var H=()=>({title:"Login | Runnable"});function v(){var c,d,p,f;let r=x(),u=t.useRef(null),l=t.useRef(null);return t.useEffect(()=>{var g,w,b,y;(g=r==null?void 0:r.errors)!=null&&g.email?(w=u.current)==null||w.focus():(b=r==null?void 0:r.errors)!=null&&b.password&&((y=l.current)==null||y.focus())},[r]),(0,e.jsx)(B,{minH:"100vh",align:"center",justify:"center",bg:"gray.50",children:(0,e.jsx)(o,{spacing:8,mx:"auto",maxW:"lg",py:12,px:6,children:(0,e.jsx)(F,{method:"post",className:"space-y-6",children:(0,e.jsx)(R,{rounded:"lg",bg:"white",boxShadow:"lg",p:8,width:"340px",children:(0,e.jsxs)(o,{spacing:4,children:[(0,e.jsxs)(a,{id:"email",isInvalid:!!((c=r==null?void 0:r.errors)!=null&&c.email),children:[(0,e.jsx)(i,{children:"Email address"}),(0,e.jsx)(m,{ref:u,type:"email",name:"email",required:!0}),(0,e.jsx)(n,{children:(d=r==null?void 0:r.errors)==null?void 0:d.email})]}),(0,e.jsxs)(a,{id:"password",isInvalid:!!((p=r==null?void 0:r.errors)!=null&&p.password),children:[(0,e.jsx)(i,{children:"Password"}),(0,e.jsx)(m,{ref:l,type:"password",name:"password",required:!0}),(0,e.jsx)(n,{children:(f=r==null?void 0:r.errors)==null?void 0:f.password})]}),(0,e.jsxs)(o,{spacing:10,children:[(0,e.jsx)(o,{direction:{base:"column",sm:"row"},align:"start",justify:"space-between",children:(0,e.jsx)(L,{id:"remember",name:"remember",children:"Remember me"})}),(0,e.jsx)(E,{type:"submit",bg:"blue.400",color:"white",_hover:{bg:"blue.500"},children:"Log in"})]})]})})})})})}export{H as a,v as b};
