import{d as b,i as v,j as y,v as x,o as n,g as w,T as V,c,w as m,a,u as s,Z as B,t as C,h as p,b as r,k as $,e as f,n as P,f as N}from"./app-f2e425ba.js";import{_ as U}from"./GuestLayout.vue_vue_type_script_setup_true_lang-0ea01dcc.js";import{_,a as g,b as h}from"./TextInput.vue_vue_type_script_setup_true_lang-d009a6cb.js";import{P as q}from"./PrimaryButton-286c1d12.js";import"./ApplicationLogo-cc1ef3c5.js";import"./_plugin-vue_export-helper-c27b6911.js";const L=["value"],R=b({__name:"Checkbox",props:{checked:{type:Boolean},value:{}},emits:["update:checked"],setup(d,{emit:e}){const i=e,l=d,o=v({get(){return l.checked},set(t){i("update:checked",t)}});return(t,u)=>y((n(),w("input",{type:"checkbox",value:t.value,"onUpdate:modelValue":u[0]||(u[0]=k=>o.value=k),class:"rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500"},null,8,L)),[[x,o.value]])}}),S={key:0,class:"mb-4 font-medium text-sm text-green-600"},j=["onSubmit"],D={class:"mt-4"},E={class:"block mt-4"},F={class:"flex items-center"},M=r("span",{class:"ms-2 text-sm text-gray-600"},"Remember me",-1),T={class:"flex items-center justify-end mt-4"},J=b({__name:"Login",props:{canResetPassword:{type:Boolean},status:{}},setup(d){const e=V({email:"",password:"",remember:!1}),i=()=>{e.post(route("login"),{onFinish:()=>{e.reset("password")}})};return(l,o)=>(n(),c(U,null,{default:m(()=>[a(s(B),{title:"Log in"}),l.status?(n(),w("div",S,C(l.status),1)):p("",!0),r("form",{onSubmit:N(i,["prevent"])},[r("div",null,[a(_,{for:"email",value:"Email"}),a(g,{id:"email",type:"email",class:"mt-1 block w-full",modelValue:s(e).email,"onUpdate:modelValue":o[0]||(o[0]=t=>s(e).email=t),required:"",autofocus:"",autocomplete:"username"},null,8,["modelValue"]),a(h,{class:"mt-2",message:s(e).errors.email},null,8,["message"])]),r("div",D,[a(_,{for:"password",value:"Password"}),a(g,{id:"password",type:"password",class:"mt-1 block w-full",modelValue:s(e).password,"onUpdate:modelValue":o[1]||(o[1]=t=>s(e).password=t),required:"",autocomplete:"current-password"},null,8,["modelValue"]),a(h,{class:"mt-2",message:s(e).errors.password},null,8,["message"])]),r("div",E,[r("label",F,[a(R,{name:"remember",checked:s(e).remember,"onUpdate:checked":o[2]||(o[2]=t=>s(e).remember=t)},null,8,["checked"]),M])]),r("div",T,[l.canResetPassword?(n(),c(s($),{key:0,href:l.route("password.request"),class:"underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},{default:m(()=>[f(" Forgot your password? ")]),_:1},8,["href"])):p("",!0),a(q,{class:P(["ms-4",{"opacity-25":s(e).processing}]),disabled:s(e).processing},{default:m(()=>[f(" Log in ")]),_:1},8,["class","disabled"])])],40,j)]),_:1}))}});export{J as default};
