/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{handlesGroup as t,makeHandle as o}from"../../core/handleUtils.js";import"../../core/has.js";import{watch as e,sync as i}from"../../core/reactiveUtils.js";const n=500,r=1e3;function c({getLoading:c,setEffectiveLoading:f}){let s,u;function a(){clearTimeout(u),u=void 0}function l(t){s=t?Date.now():void 0,f(t)}function m(t,o){if(t<=0)return l(o);u=setTimeout(()=>{a(),l(o)},t)}return l(c()),t([e(c,t=>{a(),t?m(n,!0):m(null!=s?r-(Date.now()-s):0,!1)},i),o(a)])}export{c as connectDelayedLoading,r as minShownDuration,n as showDelay};
