import{useRef as r,useEffect as e}from"react";import o from"lodash/isEqual";import{useFilterStore as a}from"../../stores/filter-store/useFilterStore.js";import"../../stores/company-safeguard/CompanySafeguardContext.js";import{useCompanySafeguard as t}from"../../stores/company-safeguard/useCompanySafeguard.js";var s=function(s){var n=a((function(r){var e;return null!==(e=r.filters.companyId)&&void 0!==e?e:null})),u=t().isSafeguardReady,i=s.clearCache,l=s.clearTiles,c=s.loadAllWells,f=s.hasLoadedRef,d=r(void 0);e((function(){u&&(void 0!==d.current?o(d.current,n)||(i(),l(),f.current=!1,d.current=n,c()):d.current=n)}),[u,n,i,l,c,f])};export{s as useCompanyIdChangeEffect};
//# sourceMappingURL=useCompanyIdChangeEffect.js.map
