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