import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import"./vendor-primevue-CIZeDNer.js";import{A as t,D as n,G as r,Ht as i,I as a,K as o,Lt as s,O as c,R as l,_t as u,b as d,et as f,j as p,k as m,lt as h,ut as g,zt as _}from"./vendor-vue-core-IZuWV8u3.js";import"./vendor-other-DOjudfJ1.js";import"./i18n-qK6isbxx.js";import"./vendor-reka-ui-NsM8zEZd.js";import{t as v}from"./src-B6n4nS3q.js";import{t as y}from"./Button-BonqIZfE.js";import{r as b}from"./widgetTypes-Di_LOvT7.js";import{t as x}from"./useCopyToClipboard-DeXt33ef.js";import{t as S}from"./Textarea-DUfT7p2u.js";import{o as C,r as w}from"./widgetPropFilter-DxSGphVz.js";import{t as T}from"./layout-Bji3m7GD.js";var E=[`for`],D=l({__name:`WidgetTextarea`,props:r({widget:{},placeholder:{default:``}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let r=g(e,`modelValue`),l=b(),{copyToClipboard:D}=x(),O=n(()=>C(e.widget.options,w)),k=n(()=>e.widget.label||e.widget.name),A=h(),j=n(()=>!!(e.widget.options?.read_only||e.widget.options?.disabled));function handleCopy(){D(r.value)}return(e,n)=>(f(),p(`div`,{class:_(s(v)(`group relative rounded-lg transition-all focus-within:ring focus-within:ring-component-node-widget-background-highlighted hover:bg-component-node-widget-background-hovered`,e.widget.borderStyle))},[s(l)?t(``,!0):(f(),p(`label`,{key:0,for:s(A),class:`pointer-events-none absolute top-1.5 left-3 z-10 text-xxs text-muted-foreground`},i(k.value),9,E)),a(S,o(O.value,{id:s(A),modelValue:r.value,"onUpdate:modelValue":n[0]||=e=>r.value=e,class:s(v)(s(T),`size-full resize-none text-xs`,!s(l)&&`pt-5`),placeholder:e.placeholder,readonly:j.value,"data-capture-wheel":`true`,onPointerdownCapture:n[1]||=d(()=>{},[`stop`]),onPointermoveCapture:n[2]||=d(()=>{},[`stop`]),onPointerupCapture:n[3]||=d(()=>{},[`stop`]),onContextmenuCapture:n[4]||=d(()=>{},[`stop`])}),null,16,[`id`,`modelValue`,`class`,`placeholder`,`readonly`]),j.value?(f(),m(y,{key:1,variant:`textonly`,size:`icon`,class:`invisible absolute top-1.5 right-1.5 z-10 group-focus-within:visible group-hover:visible hover:bg-base-foreground/10`,title:e.$t(`g.copyToClipboard`),"aria-label":e.$t(`g.copyToClipboard`),onClick:handleCopy,onPointerdownCapture:n[5]||=d(()=>{},[`stop`])},{default:u(()=>n[6]||=[c(`i`,{class:`icon-[lucide--copy] size-4 text-component-node-foreground`},null,-1)]),_:1},8,[`title`,`aria-label`])):t(``,!0)],2))}});export{D as default};
//# sourceMappingURL=WidgetTextarea-CZRK6GR0.js.map