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