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