import{f as C,a7 as A,K as d,V as $,q as M,x as f,P as D,L as s,v as r,a9 as I,u as v,U as b,a2 as F,aa as K,S as L,T as S,a8 as y,e as V,g as q,b as U}from"./vue-CPEHuaRL.js";import{o as k,aB as E}from"./index-vmUNdjsE.js";const W={class:"d-flex flex-row mt-2 ga-2 align-center"},j={class:"autofill-container d-flex flex-grow-1 align-center border border-opacity-50 pa-2 rounded-lg"},z=["disabled"],H=C({inheritAttrs:!1,__name:"AutofillableField",props:y({title:{},prependIcon:{},prependIconInner:{},appendIcon:{},appendIconInner:{},disabled:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:y(["click:prepend","click:prependInner","click:append","click:appendInner","submit"],["update:modelValue"]),setup(e,{emit:c}){const o=c,u=A(e,"modelValue");function w(n){const t="on"+n,i=q(),g=i&&i.vnode&&i.vnode.props||{};return!!g[t]||Object.keys(g).some(P=>{const h=P.toLowerCase(),x=n.toLowerCase();return h.endsWith(x)||h.endsWith(x.replace(":",""))})}function l(n){return V(()=>e.disabled?{}:w(n)?{click:t=>{t.preventDefault(),o(n)}}:{})}const p=l("click:prepend"),a=l("click:prependInner"),m=l("click:appendInner"),B=l("click:append");return(n,t)=>(d(),$("div",{class:M([{"autofill-container--disabled":e.disabled},"my-2 border-0"])},[f("div",null,D(e.title),1),f("div",W,[e.prependIcon?(d(),s(k,r({key:0,icon:e.prependIcon,color:"accent"},I(v(p))),null,16,["icon"])):b("",!0),f("div",j,[e.prependIconInner?(d(),s(k,r({key:0,icon:e.prependIconInner,color:"accent"},I(v(a))),null,16,["icon"])):b("",!0),F(f("input",r({"onUpdate:modelValue":t[0]||(t[0]=i=>u.value=i),disabled:e.disabled,class:"flex-grow-1",style:{height:"32px"}},n.$attrs,{onKeydown:t[1]||(t[1]=L(S(i=>!e.disabled&&n.$emit("submit"),["prevent"]),["enter"]))}),null,16,z),[[K,u.value]]),e.appendIconInner?(d(),s(k,r({key:1,icon:e.appendIconInner,color:"accent"},I(v(m))),null,16,["icon"])):b("",!0)]),e.appendIcon?(d(),s(k,r({key:1,icon:e.appendIcon,color:"accent"},I(v(B))),null,16,["icon"])):b("",!0)])],2))}}),O=E(H,[["__scopeId","data-v-6578322c"]]),J=C({inheritAttrs:!1,__name:"PasswordField",props:y({title:{},hideIcon:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:y(["submit"],["update:modelValue"]),setup(e){const c=A(e,"modelValue"),o=U(!1);function u(){o.value=!o.value}const w=V(()=>o.value?"text":"password"),l=V(()=>o.value?"mdi-eye":"mdi-eye-off");return(p,a)=>(d(),s(O,r({modelValue:c.value,"onUpdate:modelValue":a[0]||(a[0]=m=>c.value=m),"append-icon-inner":e.hideIcon?"":l.value,title:e.title,type:w.value,name:"password"},p.$attrs,{onSubmit:a[1]||(a[1]=m=>p.$emit("submit")),"onClick:appendInner":u}),null,16,["modelValue","append-icon-inner","title","type"]))}});export{O as A,J as _};
