import{A as g,_ as x}from"./Checkbox.vue_vue_type_script_setup_true_lang-C0syscLf.js";import{_ as f}from"./InputError.vue_vue_type_script_setup_true_lang-rMzOKLUE.js";import{_}from"./TextLink.vue_vue_type_script_setup_true_lang-BF1cg0nH.js";import{_ as y}from"./index-C32fBP6Q.js";import{_ as p}from"./Input.vue_vue_type_script_setup_true_lang-C2RPzpSC.js";import{_ as l}from"./Label.vue_vue_type_script_setup_true_lang-Bs6ONg8r.js";import{_ as w}from"./AuthLayout.vue_vue_type_script_setup_true_lang-7K5JbaF3.js";import{r as h}from"./index-DpULkwFX.js";import{d as v,o as i,g as d,w as r,b as t,e,h as k,a as C,t as b,j as u,aq as $,N as L,f as s,i as a}from"./app-bWy6VYs1.js";import{L as B}from"./loader-circle-oqQD25qk.js";import"./index-CMWG4mbA.js";import"./VisuallyHidden-0BfmsMPn.js";import"./useForwardExpose-Cx2E44RD.js";import"./RovingFocusGroup-D20OvR_w.js";import"./VisuallyHiddenInput-DpGfVqSD.js";import"./check-QVwPCuu6.js";import"./index-CKv6rp-i.js";const N={key:0,class:"mb-6 rounded-lg bg-green-50 p-4 text-center text-sm font-medium text-green-700 border border-green-200"},S={class:"space-y-5"},q={class:"space-y-2"},E={class:"space-y-2"},P={class:"flex items-center justify-between"},R={class:"flex items-center justify-between"},Y=v({__name:"Login",props:{status:{},canResetPassword:{type:Boolean}},setup(V){return(n,o)=>(i(),d(w,{title:"Welcome back",description:"Sign in to your JobCardOnline account to continue"},{default:r(()=>[t(e(k),{title:"Log in"}),n.status?(i(),C("div",N,b(n.status),1)):u("",!0),t(e($),L(e(g).store.form(),{"reset-on-success":["password"],class:"space-y-6"}),{default:r(({errors:c,processing:m})=>[s("div",S,[s("div",q,[t(e(l),{for:"email",class:"text-sm font-medium text-gray-700"},{default:r(()=>[...o[0]||(o[0]=[a("Email address",-1)])]),_:1}),t(e(p),{id:"email",type:"email",name:"email",required:"",autofocus:"",tabindex:1,autocomplete:"email",placeholder:"Enter your email",class:"h-12 px-4 text-base border-gray-300 focus:border-blue-500 focus:ring-blue-500"}),t(f,{message:c.email},null,8,["message"])]),s("div",E,[s("div",P,[t(e(l),{for:"password",class:"text-sm font-medium text-gray-700"},{default:r(()=>[...o[1]||(o[1]=[a("Password",-1)])]),_:1}),n.canResetPassword?(i(),d(_,{key:0,href:e(h)(),class:"text-sm text-blue-600 hover:text-blue-500 font-medium",tabindex:5},{default:r(()=>[...o[2]||(o[2]=[a(" Forgot password? ",-1)])]),_:1},8,["href"])):u("",!0)]),t(e(p),{id:"password",type:"password",name:"password",required:"",tabindex:2,autocomplete:"current-password",placeholder:"Enter your password",class:"h-12 px-4 text-base border-gray-300 focus:border-blue-500 focus:ring-blue-500"}),t(f,{message:c.password},null,8,["message"])]),s("div",R,[t(e(l),{for:"remember",class:"flex items-center space-x-3 cursor-pointer"},{default:r(()=>[t(e(x),{id:"remember",name:"remember",tabindex:3,class:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),o[3]||(o[3]=s("span",{class:"text-sm text-gray-700"},"Remember me for 30 days",-1))]),_:1})]),t(e(y),{type:"submit",class:"w-full h-12 text-base font-medium bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors duration-200 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",tabindex:4,disabled:m,"data-test":"login-button"},{default:r(()=>[m?(i(),d(e(B),{key:0,class:"h-5 w-5 animate-spin mr-2"})):u("",!0),a(" "+b(m?"Signing in...":"Sign in to your account"),1)]),_:2},1032,["disabled"])]),o[4]||(o[4]=s("div",{class:"mt-6 text-center"},[s("p",{class:"text-sm text-gray-600"},[a(" Looking for client access? "),s("a",{href:"/client-login",class:"ml-1 font-medium text-blue-600 hover:text-blue-500"}," Client Login ")]),s("p",{class:"mt-2 text-sm text-gray-600"},[a(" Don't have a client account? "),s("a",{href:"/client-zone/register",class:"font-medium text-blue-600 hover:text-blue-500"}," Register for client access ")])],-1))]),_:1},16)]),_:1}))}});export{Y as default};
