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