import{C as e,D as t,E as n,F as r,H as i,Q as a,S as o,T as s,U as c,X as l,Y as u,b as d,g as f,i as p,l as m,n as h,r as g,x as _,y as v}from"./app-BUJlOoW4.js";import{t as y}from"./i18n-DSO-aWC8.js";import{t as b}from"./GuestLayout-Ds_If7ZT.js";import{n as x,t as S}from"./TextInput-DmBftOu8.js";import{t as C}from"./InputLabel-DZkuPMbJ.js";import{t as w}from"./PrimaryButton-bk2PUJj9.js";var T=[`value`],E=t({__name:`Checkbox`,props:{checked:{type:Boolean},value:{}},emits:[`update:checked`],setup(t,{emit:n}){let i=n,a=t,o=v({get(){return a.checked},set(e){i(`update:checked`,e)}});return(n,i)=>c((r(),e(`input`,{type:`checkbox`,value:t.value,"onUpdate:modelValue":i[0]||=e=>o.value=e,class:`rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800`},null,8,T)),[[m,o.value]])}}),D={key:0,class:`mb-4 text-sm font-medium text-green-600`},O={class:`mt-4`},k={class:`mt-4 block`},A={class:`flex items-center`},j={class:`ms-2 text-sm text-gray-600 dark:text-gray-400`},M={class:`mt-4 flex items-center justify-end`},N=t({__name:`Login`,props:{canResetPassword:{type:Boolean},status:{}},setup(t){let c=p({email:``,password:``,remember:!1}),m=()=>{c.post(route(`login`),{onFinish:()=>{c.reset(`password`)}})};return(p,v)=>(r(),_(b,null,{default:i(()=>[n(u(h),{title:u(y)(`Log in`)},null,8,[`title`]),t.status?(r(),e(`div`,D,a(t.status),1)):o(``,!0),d(`form`,{onSubmit:f(m,[`prevent`])},[d(`div`,null,[n(C,{for:`email`,value:u(y)(`Email`)},null,8,[`value`]),n(S,{id:`email`,type:`email`,class:`mt-1 block w-full`,modelValue:u(c).email,"onUpdate:modelValue":v[0]||=e=>u(c).email=e,required:``,autofocus:``,autocomplete:`username`},null,8,[`modelValue`]),n(x,{class:`mt-2`,message:u(c).errors.email},null,8,[`message`])]),d(`div`,O,[n(C,{for:`password`,value:u(y)(`Password`)},null,8,[`value`]),n(S,{id:`password`,type:`password`,class:`mt-1 block w-full`,modelValue:u(c).password,"onUpdate:modelValue":v[1]||=e=>u(c).password=e,required:``,autocomplete:`current-password`},null,8,[`modelValue`]),n(x,{class:`mt-2`,message:u(c).errors.password},null,8,[`message`])]),d(`div`,k,[d(`label`,A,[n(E,{name:`remember`,checked:u(c).remember,"onUpdate:checked":v[2]||=e=>u(c).remember=e},null,8,[`checked`]),d(`span`,j,a(u(y)(`Remember me`)),1)])]),d(`div`,M,[t.canResetPassword?(r(),_(u(g),{key:0,href:p.route(`password.request`),class:`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 dark:text-gray-400 dark:hover:text-gray-100 dark:focus:ring-offset-gray-800`},{default:i(()=>[s(a(u(y)(`Forgot your password?`)),1)]),_:1},8,[`href`])):o(``,!0),n(w,{class:l([`ms-4`,{"opacity-25":u(c).processing}]),disabled:u(c).processing},{default:i(()=>[s(a(u(y)(`Log in`)),1)]),_:1},8,[`class`,`disabled`])])],32)]),_:1}))}});export{N as default};