import{B as e,Bt as t,F as n,G as r,J as i,M as a,Mt as o,N as s,P as c,T as l,Tt as u,Ut as d,V as f,Wt as p,Y as m,ft as h,ht as g,j as _,ot as v,qt as y,w as b,x,xt as S,y as C}from"./vue-3bs2-dMU.js";import{mt as w}from"./vuetify-gGrfRH2I.js";import{r as T}from"./index-JyjLarNS.js";r(),d(),u(),C();var E={class:`d-flex flex-row mt-2 ga-2 align-center`},D={class:`autofill-container d-flex flex-grow-1 align-center border border-opacity-50 pa-2 rounded-lg`},O=[`disabled`],k=T(e({inheritAttrs:!1,__name:`AutofillableField`,props:i({title:{},prependIcon:{},prependIconInner:{},appendIcon:{},appendIconInner:{},disabled:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:i([`click:prepend`,`click:prependInner`,`click:append`,`click:appendInner`,`submit`],[`update:modelValue`]),setup(e,{emit:r}){let i=r,o=g(e,`modelValue`);function u(e){let t=`on`+e,n=f(),r=n&&n.vnode&&n.vnode.props||{};return!!r[t]||Object.keys(r).some(t=>{let n=t.toLowerCase(),r=e.toLowerCase();return n.endsWith(r)||n.endsWith(r.replace(`:`,``))})}function d(t){return _(()=>e.disabled||!u(t)?{}:{click:e=>{e.preventDefault(),i(t)}})}let C=d(`click:prepend`),T=d(`click:prependInner`),k=d(`click:appendInner`),A=d(`click:append`);return(r,i)=>(v(),n(`div`,{class:p([{"autofill-container--disabled":e.disabled},`my-2 border-0`])},[a(`div`,null,y(e.title),1),a(`div`,E,[e.prependIcon?(v(),s(w,m({key:0,icon:e.prependIcon,color:`accent`},h(t(C))),null,16,[`icon`])):c(``,!0),a(`div`,D,[e.prependIconInner?(v(),s(w,m({key:0,icon:e.prependIconInner,color:`accent`},h(t(T))),null,16,[`icon`])):c(``,!0),S(a(`input`,m({"onUpdate:modelValue":i[0]||=e=>o.value=e,disabled:e.disabled,class:`flex-grow-1`,style:{height:`32px`}},r.$attrs,{onKeydown:i[1]||=b(l(t=>!e.disabled&&r.$emit(`submit`),[`prevent`]),[`enter`])}),null,16,O),[[x,o.value]]),e.appendIconInner?(v(),s(w,m({key:1,icon:e.appendIconInner,color:`accent`},h(t(k))),null,16,[`icon`])):c(``,!0)]),e.appendIcon?(v(),s(w,m({key:1,icon:e.appendIcon,color:`accent`},h(t(A))),null,16,[`icon`])):c(``,!0)])],2))}}),[[`__scopeId`,`data-v-30c8d3de`]]);r(),u();var A=e({inheritAttrs:!1,__name:`PasswordField`,props:i({title:{},hideIcon:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:i([`submit`],[`update:modelValue`]),setup(e){let t=g(e,`modelValue`),n=o(!1);function r(){n.value=!n.value}let i=_(()=>n.value?`text`:`password`),a=_(()=>n.value?`mdi-eye`:`mdi-eye-off`);return(n,o)=>(v(),s(k,m({modelValue:t.value,"onUpdate:modelValue":o[0]||=e=>t.value=e,"append-icon-inner":e.hideIcon?``:a.value,title:e.title,type:i.value,name:`password`},n.$attrs,{onSubmit:o[1]||=e=>n.$emit(`submit`),"onClick:appendInner":r}),null,16,[`modelValue`,`append-icon-inner`,`title`,`type`]))}});export{k as n,A as t};