1import{u as f,j as e,H as p,c as j,r as b,L as d}from"./app-D67W_GFJ.js";import{C as w}from"./Checkbox-DtFjAMAV.js";import{c as v,d as N}from"./MainLayout-BFQ2nnBS.js";import{I as i}from"./InputError-BT-wl1OZ.js";import{I as c}from"./InputLabel-DZDAWAMn.js";import{P as y}from"./PrimaryButton-KiIpr0NX.js";import{T as u}from"./TextInput-DPX-JKtN.js";/* empty css */import"./x-Bmo25mt6.js";function _({status:a,canResetPassword:t,translations:s}){const{data:l,setData:m,post:x,processing:g,errors:o,reset:n}=j({email:"",password:"",remember:!1});b.useEffect(()=>()=>{n("password")},[n]);const h=r=>{r.preventDefault(),x(route("login"))};return e.jsxs("div",{className:"mt-6 w-full overflow-hidden bg-white px-6 py-4 shadow-md sm:max-w-md sm:rounded-lg",children:[a&&e.jsx("div",{className:"mb-4 text-sm font-medium text-green-600",children:a}),e.jsxs("form",{onSubmit:h,children:[e.jsxs("div",{children:[e.jsx(c,{htmlFor:"email",value:s.general.auth_email}),e.jsx(u,{id:"email",type:"email",name:"email",value:l.email,className:"mt-1 block w-full",autoComplete:"username",isFocused:!0,onChange:r=>m("email",r.target.value)}),e.jsx(i,{message:o.email,className:"mt-2"})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx(c,{htmlFor:"password",value:s.general.auth_password}),e.jsx(u,{id:"password",type:"password",name:"password",value:l.password,className:"mt-1 block w-full",autoComplete:"current-password",onChange:r=>m("password",r.target.value)}),e.jsx(i,{message:o.password,className:"mt-2"})]}),e.jsx("div",{className:"mt-4 block",children:e.jsxs("label",{className:"flex items-center",children:[e.jsx(w,{name:"remember",checked:l.remember,onChange:r=>m("remember",r.target.checked)}),e.jsx("span",{className:"ms-2 text-sm text-gray-600",children:s.general.auth_remember_me})]})}),e.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[e.jsx(d,{href:route("register"),className:"text-sm text-gray-600 underline hover:text-gray-900",children:"Criar Conta"}),e.jsxs("div",{className:"flex items-center",children:[t&&e.jsx(d,{href:route("password.request"),className:"rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:s.general.auth_forgot_password}),e.jsx(y,{className:"ms-4",disabled:g,children:s.general.auth_login_button})]})]})]})]})}function k({status:a,canResetPassword:t}){const{translations:s}=f().props,l=s.general.auth_login_button||"Entrar",m=e.jsxs("div",{className:"mt-6 w-full animate-pulse overflow-hidden bg-white px-6 py-4 shadow-md sm:max-w-md sm:rounded-lg",children:[e.jsx("div",{className:"mb-2 h-6 w-1/4 rounded bg-gray-200"}),e.jsx("div",{className:"mb-4 h-10 w-full rounded bg-gray-300"}),e.jsx("div",{className:"mb-2 h-6 w-1/4 rounded bg-gray-200"}),e.jsx("div",{className:"mb-4 h-10 w-full rounded bg-gray-300"}),e.jsx("div",{className:"mb-4 h-6 w-full rounded bg-gray-200"}),e.jsxs("div",{className:"mt-4 flex items-center justify-end",children:[e.jsx("div",{className:"h-5 w-1/3 rounded bg-gray-200"}),e.jsx("div",{className:"ms-4 h-10 w-1/4 rounded bg-gray-300"})]})]});return e.jsxs("div",{className:"flex flex-col items-center pt-6 sm:justify-center sm:pt-0",children:[e.jsx(p,{title:l}),e.jsx("h1",{className:"text-3xl font-bold text-gray-800 dark:text-gray-200",children:l}),e.jsx(v,{fallback:m,children:e.jsx(_,{status:a,canResetPassword:t,translations:s})})]})}k.layout=a=>{var t,s;return e.jsx(N,{title:((s=(t=a.props.translations)==null?void 0:t.general)==null?void 0:s.login_page_title)||"Entrar",showSearchHeader:!1,children:a})};export{k 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.