import{d as y,P as x,q as C,H as k,r as N,F as S,t as L,C as T,h as A,x as n,c as a,v as e,i as t,y as u,a0 as B,S as I,D as F,b as U}from"./index-C5GbdPxY.js";import{l as H}from"./logo-Cqa1j7dW.js";import{u as M}from"./form-B2je8iBR.js";import{V as h}from"./VImg-BlqLjeEy.js";import{d as R,a as _,c as $}from"./VCard-DptrO3GI.js";import{V as j}from"./VForm-BZc3SavJ.js";import{V as q,a as c}from"./VAvatar-RkAR0u0e.js";import{V as b}from"./VTextField-DxEUpn3-.js";import{_ as D}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./forwardRefs-CB8NoG9r.js";import"./index-XcTykuv2.js";const P="/assets/auth-v1-bottom-shape-crxWNCWd.svg",W="/assets/auth-v1-top-shape-eAwqa87i.svg",z={class:"auth-wrapper d-flex align-center justify-center"},E={class:"position-relative my-sm-16"},G=["innerHTML"],J={class:"app-logo-title"},K={class:"text-h4 mb-1"},O={class:"mb-0"},Q=y({__name:"Login",setup(X){const v=x(),m=C(),{t:o}=k(),s=M({identifier:"",password:""}),d=N(!1),V=S(()=>s.loading.value||!s.state.identifier||!s.state.password),w=()=>{s.submit(()=>v.login(s.state.identifier,s.state.password))};return(f,r)=>{const g=L("RouterLink");return A(),T("div",z,[n("div",E,[a(h,{class:"text-primary auth-v1-top-shape d-none d-sm-block",src:e(W)},null,8,["src"]),a(h,{class:"text-primary auth-v1-bottom-shape d-none d-sm-block",src:e(P)},null,8,["src"]),a($,{class:U(["auth-card",f.$vuetify.display.smAndUp?"pa-6":"pa-4"]),"max-width":"460",width:f.$vuetify.display.smAndUp?"28rem":""},{default:t(()=>[a(R,{class:"justify-center"},{default:t(()=>[a(g,{class:"app-logo",to:"/"},{default:t(()=>[n("div",{class:"d-flex",innerHTML:e(H)},null,8,G),n("h1",J,u(e(m).appName),1)]),_:1})]),_:1}),a(_,null,{default:t(()=>[n("h4",K,u(e(o)("user::auth.welcome_to_app",{app_name:e(m).appName})),1),n("p",O,u(e(o)("user::auth.description",{app_name:e(m).appName})),1)]),_:1}),a(_,null,{default:t(()=>[a(j,{onSubmit:B(w,["prevent"])},{default:t(()=>[a(q,null,{default:t(()=>[a(c,{cols:"12"},{default:t(()=>{var l,i;return[a(b,{modelValue:e(s).state.identifier,"onUpdate:modelValue":r[0]||(r[0]=p=>e(s).state.identifier=p),autofocus:"",error:!!((l=e(s).errors.value)!=null&&l.identifier),"error-messages":(i=e(s).errors.value)==null?void 0:i.identifier,label:e(o)("user::attributes.auth.identifier"),placeholder:"admin@forkiva.app",type:"email"},null,8,["modelValue","error","error-messages","label"])]}),_:1}),a(c,{cols:"12"},{default:t(()=>{var l,i;return[a(b,{modelValue:e(s).state.password,"onUpdate:modelValue":r[1]||(r[1]=p=>e(s).state.password=p),"append-inner-icon":e(d)?"tabler-eye":"tabler-eye-off",autocomplete:"password",error:!!((l=e(s).errors.value)!=null&&l.password),"error-messages":(i=e(s).errors.value)==null?void 0:i.password,label:e(o)("user::attributes.auth.password"),placeholder:e(o)("user::attributes.auth.password"),type:e(d)?"text":"password","onClick:appendInner":r[2]||(r[2]=p=>d.value=!e(d))},null,8,["modelValue","append-inner-icon","error","error-messages","label","placeholder","type"])]}),_:1}),a(c,{cols:"12"},{default:t(()=>[a(I,{block:"",disabled:e(V),loading:e(s).loading.value,type:"submit"},{default:t(()=>[F(u(e(o)("user::auth.login")),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["class","width"])])])}}}),de=D(Q,[["__scopeId","data-v-6e340a5e"]]);export{de as default};
