import"./rolldown-runtime-DIIn1E2Q.js";import{rt as e}from"./vendor-primevue-_eYbXsHY.js";import{A as t,D as n,G as r,I as i,K as a,O as o,R as s,Rt as c,_t as l,et as u,k as d,ut as f}from"./vendor-vue-core-DO0afONr.js";import"./vendor-other-D7fTIduy.js";import{t as p}from"./src-D_KFn0Xz.js";import{t as m}from"./Loader-tgMSU-yO.js";import{o as h,r as g}from"./widgetPropFilter-CM0eri-7.js";import{t as _}from"./WidgetLayoutField-CJulDjD5.js";import{t as v}from"./layout-DQOEvO-3.js";var y={class:`relative`},b=s({__name:`WidgetInputText`,props:r({widget:{},size:{default:`medium`},invalid:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(r){let s=f(r,`modelValue`),b=n(()=>h(r.widget.options,g)),x=n(()=>!!(r.widget.options?.read_only||r.widget.options?.disabled)),S=n(()=>({name:r.widget.name,label:r.widget.label,borderStyle:p(r.widget.borderStyle,r.invalid&&`border border-destructive-background`)}));return(n,r)=>(u(),d(_,{widget:S.value},{default:l(()=>[o(`div`,y,[n.loading?(u(),d(m,{key:0,size:`sm`,class:`absolute top-1/2 left-3 z-10 -translate-y-1/2 text-component-node-foreground`})):t(``,!0),i(c(e),a({modelValue:s.value,"onUpdate:modelValue":r[0]||=e=>s.value=e},b.value,{class:c(p)(c(v),`w-full px-4 hover:bg-component-node-widget-background-hovered`,n.size===`large`?`py-3 text-sm`:`py-2 text-xs`,n.loading&&`pl-9`),"aria-label":n.widget.name,readonly:x.value,size:`small`,pt:{root:`truncate min-w-[4ch]`}}),null,16,[`modelValue`,`class`,`aria-label`,`readonly`])])]),_:1},8,[`widget`]))}});export{b as default};
//# sourceMappingURL=WidgetInputText-DJ3nJ2m2.js.map