import{C as e,D as t,E as n,G as r,L as i,Q as a,S as o,W as s,Z as c,_ as l,a as u,b as d,et as f,i as p,k as m,r as h,u as g,w as _,x as v}from"./app-UGuEpyiV.js";import{t as y}from"./i18n-Bjrme-0c.js";import{t as b}from"./GuestLayout-BZTuDlar.js";import{n as x,t as S}from"./TextInput-Bz8BNQX-.js";import{t as C}from"./InputLabel-LStcPEgY.js";import{t as w}from"./PrimaryButton-Bk6B_p4H.js";var T=[`value`],E=m({__name:`Checkbox`,props:{checked:{type:Boolean},value:{}},emits:[`update:checked`],setup(e,{emit:t}){let n=t,a=e,o=d({get(){return a.checked},set(e){n(`update:checked`,e)}});return(t,n)=>r((i(),_(`input`,{type:`checkbox`,value:e.value,"onUpdate:modelValue":n[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)),[[g,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=m({__name:`Login`,props:{canResetPassword:{type:Boolean},status:{}},setup(r){let d=u({email:``,password:``,remember:!1}),m=()=>{d.post(route(`login`),{onFinish:()=>{d.reset(`password`)}})};return(u,g)=>(i(),o(b,null,{default:s(()=>[t(c(h),{title:c(y)(`Log in`)},null,8,[`title`]),r.status?(i(),_(`div`,D,f(r.status),1)):e(``,!0),v(`form`,{onSubmit:l(m,[`prevent`])},[v(`div`,null,[t(C,{for:`email`,value:c(y)(`Email`)},null,8,[`value`]),t(S,{id:`email`,type:`email`,class:`mt-1 block w-full`,modelValue:c(d).email,"onUpdate:modelValue":g[0]||=e=>c(d).email=e,required:``,autofocus:``,autocomplete:`username`},null,8,[`modelValue`]),t(x,{class:`mt-2`,message:c(d).errors.email},null,8,[`message`])]),v(`div`,O,[t(C,{for:`password`,value:c(y)(`Password`)},null,8,[`value`]),t(S,{id:`password`,type:`password`,class:`mt-1 block w-full`,modelValue:c(d).password,"onUpdate:modelValue":g[1]||=e=>c(d).password=e,required:``,autocomplete:`current-password`},null,8,[`modelValue`]),t(x,{class:`mt-2`,message:c(d).errors.password},null,8,[`message`])]),v(`div`,k,[v(`label`,A,[t(E,{name:`remember`,checked:c(d).remember,"onUpdate:checked":g[2]||=e=>c(d).remember=e},null,8,[`checked`]),v(`span`,j,f(c(y)(`Remember me`)),1)])]),v(`div`,M,[r.canResetPassword?(i(),o(c(p),{key:0,href:u.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:s(()=>[n(f(c(y)(`Forgot your password?`)),1)]),_:1},8,[`href`])):e(``,!0),t(w,{class:a([`ms-4`,{"opacity-25":c(d).processing}]),disabled:c(d).processing},{default:s(()=>[n(f(c(y)(`Log in`)),1)]),_:1},8,[`class`,`disabled`])])],32)]),_:1}))}});export{N as default};