import"./rolldown-runtime-DIIn1E2Q.js";import"./vendor-primevue-BDZ_jj__.js";import"./vendor-firebase-D7u00oy9.js";import{A as e,Bt as t,D as n,G as r,I as i,K as a,O as o,R as s,Rt as c,Ut as l,_t as u,b as d,et as f,j as p,k as m,lt as h,ut as g}from"./vendor-vue-core-DO0afONr.js";import"./vendor-other-CiPV8GBG.js";import"./useFeatureFlags-CeS8LuDc.js";import"./api-Cw7jP9TY.js";import"./vendor-markdown-Da9QPS2x.js";import"./colorUtil-Bsa2N3Sq.js";import"./i18n-CF_88JEG.js";import"./vendor-reka-ui-B53kLmAc.js";import{t as _}from"./src-NuWuoO1R.js";import{t as v}from"./Button-Ca3rDegY.js";import{vt as y}from"./dialogService-CfgsFapJ.js";import"./formatUtil-CeKPWstn.js";import"./dialogStore-G2juoay4.js";import"./userStore-Czt6jT20.js";import{r as b}from"./widgetTypes-B3taJqHN.js";import"./useErrorHandling-DXaBpHI1.js";import{n as x}from"./extensionStore-MnMxnUwx.js";import"./useExternalLink-BItqlDxr.js";import"./vendor-tiptap-Bk1lVUYZ.js";import"./markdownRendererUtil-_EbNpPBW.js";import"./Popover-CXKWNrM3.js";import"./electronDownloadStore-DudKQmD7.js";import{t as S}from"./Textarea-DSw8aTZE.js";import{o as C,r as w}from"./widgetPropFilter-dgyMmag8.js";import{t as T}from"./layout-CvM4cIQs.js";var E=[`for`],D=s({__name:`WidgetTextarea`,props:r({widget:{},placeholder:{default:``}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(r){let s=g(r,`modelValue`),D=b(),{copyToClipboard:O}=x(),k=n(()=>C(r.widget.options,w)),A=n(()=>r.widget.label||r.widget.name),j=h(),M=n(()=>!!(r.widget.options?.read_only||r.widget.options?.disabled));function handleContextMenu(e){if(y()){e.stopPropagation();return}e.preventDefault()}function handleCopy(){O(s.value)}return(n,r)=>(f(),p(`div`,{class:t(c(_)(`group relative rounded-lg transition-all focus-within:ring focus-within:ring-component-node-widget-background-highlighted hover:bg-component-node-widget-background-hovered`,n.widget.borderStyle))},[c(D)?e(``,!0):(f(),p(`label`,{key:0,for:c(j),class:`pointer-events-none absolute top-1.5 left-3 z-10 text-xxs text-muted-foreground`},l(A.value),9,E)),i(S,a(k.value,{id:c(j),modelValue:s.value,"onUpdate:modelValue":r[0]||=e=>s.value=e,class:c(_)(c(T),`size-full resize-none text-xs`,!c(D)&&`pt-5`),placeholder:n.placeholder,readonly:M.value,"data-capture-wheel":`true`,onPointerdownCapture:r[1]||=d(()=>{},[`stop`]),onPointermoveCapture:r[2]||=d(()=>{},[`stop`]),onPointerupCapture:r[3]||=d(()=>{},[`stop`]),onContextmenuCapture:handleContextMenu}),null,16,[`id`,`modelValue`,`class`,`placeholder`,`readonly`]),M.value?(f(),m(v,{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:n.$t(`g.copyToClipboard`),"aria-label":n.$t(`g.copyToClipboard`),onClick:handleCopy,onPointerdownCapture:r[4]||=d(()=>{},[`stop`])},{default:u(()=>r[5]||=[o(`i`,{class:`icon-[lucide--copy] size-4 text-component-node-foreground`},null,-1)]),_:1},8,[`title`,`aria-label`])):e(``,!0)],2))}});export{D as default};
//# sourceMappingURL=WidgetTextarea-CDWg9VwI.js.map