'use client';
import{jsx as r}from"react/jsx-runtime";import{useRef as e,useCallback as t}from"react";let l=({setting:l,builderProps:o})=>{let n=e(null),a=e(null),u=e(new AbortController),c=t(r=>{alert(r)},[]),d=l?.triggerUpdate==="blur"?{onBlur:r=>{u.current.signal.aborted&&(u.current=new AbortController),c(r.target.value)}}:{onChange:()=>{a.current&&(u.current.signal.aborted||u.current.abort(),clearTimeout(a.current)),a.current=setTimeout(()=>{u.current=new AbortController,c(n.current?.value??"")},l?.debounce??1e3)}};return r("textarea",{placeholder:l?.placeholder,"data-id":o?.uid,ref:n,className:"gp-w-full gp-rounded gp-border gp-p-4",...d})};export{l as default};
