import{useRef as r,useEffect as e}from"react";import o from"lodash/isEqual";import{useFilterStore as t}from"../../stores/filter-store/useFilterStore.js";import"../../stores/company-safeguard/CompanySafeguardContext.js";import{useCompanySafeguard as a}from"../../stores/company-safeguard/useCompanySafeguard.js";var n=function(n){var u=t((function(r){var e;return null!==(e=r.filters.companyId)&&void 0!==e?e:null})),s=a().isSafeguardReady,i=n.enabled,f=n.store,c=n.queueRef,d=n.clearCache,l=n.clearTiles,m=n.handleBoundsChangeRef,p=r(void 0);e((function(){if(s)if(void 0!==p.current&&i){if(!o(p.current,u)&&(d(),l(),c.current.pending=[],p.current=u,i)){var r=f.getState().bounds;r&&m.current(r)}}else p.current=u}),[s,u,i,f,d,l,c,m])};export{n as useCompanyIdResetEffect};
//# sourceMappingURL=useCompanyIdResetEffect.js.map
