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