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-ixEr2bXY.js";import{t as y}from"./GuestLayout-BbfD0euB.js";import{n as b,t as x}from"./TextInput-B3ia4lEF.js";import{t as S}from"./InputLabel-ZOlX8HhE.js";import{t as C}from"./PrimaryButton-Fz2PG5Ue.js";var w=[`value`],T=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,w)),[[m,o.value]])}}),E={key:0,class:`mb-4 text-sm font-medium text-green-600`},D={class:`mt-4`},O={class:`mt-4 block`},k={class:`flex items-center`},A={class:`mt-4 flex items-center justify-end`},j=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(),_(y,null,{default:i(()=>[n(u(h),{title:`Log in`}),t.status?(r(),e(`div`,E,a(t.status),1)):o(``,!0),d(`form`,{onSubmit:f(m,[`prevent`])},[d(`div`,null,[n(S,{for:`email`,value:`Email`}),n(x,{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(b,{class:`mt-2`,message:u(c).errors.email},null,8,[`message`])]),d(`div`,D,[n(S,{for:`password`,value:`Password`}),n(x,{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(b,{class:`mt-2`,message:u(c).errors.password},null,8,[`message`])]),d(`div`,O,[d(`label`,k,[n(T,{name:`remember`,checked:u(c).remember,"onUpdate:checked":v[2]||=e=>u(c).remember=e},null,8,[`checked`]),v[3]||=d(`span`,{class:`ms-2 text-sm text-gray-600 dark:text-gray-400`},`Remember me`,-1)])]),d(`div`,A,[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(()=>[...v[4]||=[s(` Forgot your password? `,-1)]]),_:1},8,[`href`])):o(``,!0),n(C,{class:l([`ms-4`,{"opacity-25":u(c).processing}]),disabled:u(c).processing},{default:i(()=>[...v[5]||=[s(` Log in `,-1)]]),_:1},8,[`class`,`disabled`])])],32)]),_:1}))}});export{j as default};