1import{F as e,b as t,c as n,u as r}from"./context-BZIDlLdU.js";import{i,vn as a}from"./base-layout-oNcSJYZb.js";import{t as o}from"./button-BXnWqxsq.js";import{t as s}from"./input-password--wK7_qfa.js";import{t as c}from"./spinner-BGXdi-51.js";import{t as l}from"./checkbox-Bagprkpj.js";import{t as u}from"./label-DNEVNxlQ.js";import{t as d}from"./input-D9wDi8eY.js";import{t as f}from"./input-error-D1yeHmvb.js";import{t as p}from"./auth-layout-Bmb0udg9.js";var m=t();function h({email:t,can:p}){let{t:h}=a([`auth`]),{route:g,action:_}=i();return(0,m.jsx)(n,{disableWhileProcessing:!0,action:_(`login.store`),resetOnSuccess:[`password`],className:`flex w-full flex-col gap-4`,onSuccess:t=>{e(`login`,{method:`email`,email:t.props.auth.user?.email,first_name:t.props.auth.user?.first_name,last_name:t.props.auth.user?.last_name})},children:({processing:e,errors:n})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{className:`grid gap-2`,children:[(0,m.jsx)(u,{htmlFor:`email`,className:`sr-only`,children:h(e=>e.login.emailInputLabel)}),(0,m.jsx)(d,{required:!0,autoFocus:!0,id:`email`,type:`email`,name:`email`,autoComplete:`email`,defaultValue:t??``,placeholder:h(e=>e.login.emailInputPlaceholder)}),(0,m.jsx)(f,{message:n.email})]}),(0,m.jsxs)(`div`,{className:`grid gap-2`,children:[(0,m.jsx)(u,{htmlFor:`password`,className:`sr-only`,children:h(e=>e.login.passwordInputLabel)}),(0,m.jsx)(s,{required:!0,id:`password`,name:`password`,autoComplete:`current-password`,placeholder:h(e=>e.login.passwordInputPlaceholder)}),(0,m.jsx)(f,{message:n.password})]}),(0,m.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,m.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[(0,m.jsx)(l,{id:`remember`,name:`remember`}),(0,m.jsx)(u,{htmlFor:`remember`,className:`text-sm font-normal text-muted-foreground sm:text-base`,children:h(e=>e.login.rememberMe)})]}),p.reset_password&&(0,m.jsx)(r,{prefetch:!0,href:g(`password.request`),className:`text-sm font-normal text-muted-foreground hover:underline sm:text-base`,children:h(e=>e.login.forgotPassword)})]}),(0,m.jsxs)(`div`,{className:`mt-4 grid gap-5`,children:[(0,m.jsxs)(o,{type:`submit`,disabled:e,className:`login-button`,children:[(0,m.jsx)(c,{loading:e}),(0,m.jsx)(`span`,{children:h(e=>e.login.submit)})]}),p.register&&(0,m.jsxs)(`p`,{className:`flex items-center justify-center gap-1 text-sm font-normal text-muted-foreground sm:text-base`,children:[(0,m.jsx)(`span`,{children:h(e=>e.login.signUpText)}),(0,m.jsx)(r,{prefetch:!0,href:g(`register`),className:`font-medium text-primary hover:underline`,children:h(e=>e.login.signUp)})]})]})]})})}h.layout=e=>(0,m.jsx)(p,{social:!0,heading:e.props.layout?.heading,subheading:e.props.layout?.subheading,children:e});export{h 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.