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