"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),s=require("../../../../stores/picker-props-store/usePickerPropsStore.js"),i=require("../../../../stores/company-safeguard/CompanySafeguardContext.js");require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/regenerator"),require("lodash"),require("uuid"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../../../../../clients/jsonApi/index.js"),require("../../../../../../clients/subscriptions/constants.js"),require("../../../../../../clients/subscriptions.v1.js"),require("../../../../../../clients/subscriptions/subscriptions-client.factory.js"),require("../../../../../../clients/api/apiCore.js"),require("../../../../../../clients/constants.js"),require("../../../../../../clients/sso/auth0.js"),require("../../../../../../clients/sso/oauth2.js"),require("../../../../../../clients/api/rateLimiter.js"),require("../../../../constants.js"),require("../../../../api/shared/dataFormatter.js"),require("zustand"),require("../../../../stores/picker-props-store/PickerPropsStoreContext.js"),require("@babel/runtime/helpers/objectWithoutProperties"),require("../../../../viewport/ViewportProvider.js"),require("../../../../viewport/ViewportContext.js"),require("querystring"),require("uuid/v1"),require("immutable"),require("query-string"),require("../../../../../../constants/goals.js"),require("../../../../../../constants/segment.js"),require("../../../../../../constants/alerts.js"),require("../../../../../../constants/apps.js"),require("../../../../../../constants/drillstring.js"),require("../../../../../../constants/completion.js"),require("../../../../../../constants/appPackages.js"),require("../../../../../../constants/notifications.js"),require("../../../../../../constants/feed.js"),require("../../../../../../constants/bha.js"),require("../../../../../../constants/corvaCompanyId.js"),require("../../../../../GradientManager/configuration/constants.js"),require("../../../../../../utils/index.js"),require("jsona"),require("../../../../../../utils/env.js"),require("../../../../../StatusBadge/constants.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../../../../../constants/streamSourceType.js"),require("../../../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),require("../../../../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js"),require("../../../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js"),require("../../../../../../componentsV2/AppSettings/AppSettingsPinningContext.js"),require("../../../../stores/filter-store/FilterStoreContext.js"),require("../../../../stores/filter-store/utils/cascade-hierarchies.js"),require("react-virtualized");var t=require("../../../../hooks/useCompanies.js");require("lodash/debounce"),require("../../../../stores/viewport-store/ViewportStoreContext.js"),require("lz-string"),require("@mapbox/tilebelt"),require("../../../Map/OffsetWellMap/constants.js"),require("lodash/isEqual"),require("../../../../stores/viewport-store/ViewportStoreProvider.js");var o=require("../../../../hooks/useLoadAllWellsCompanySafeguard.js");require("../../../../utils/getCoordinatedWells.js"),require("geolib"),require("../../../../../../utils/convert.js"),require("@babel/runtime/helpers/typeof"),require("../../../../stores/idas-resync-store/IdasResyncStoreContext.js"),require("../../../../stores/idas-resync-store/IdasResyncStoreProvider.js"),require("../../../../hooks/use-well-data-pipeline/useCompanyMetricKey.js"),require("../../../../hooks/use-well-data-pipeline/wellTransformations.js");var n=function(n){var a=n.children,u=s.usePickerPropsStore((function(e){return e.open})),p=t.useCompanies({open:u}),c=p.canViewCompanies,l=p.canViewCompaniesLoading,q=p.companies,d=o.useLoadAllWellsCompanySafeguard({companies:q,canViewCompanies:c,canViewCompaniesLoading:l}),m=d.isSafeguardReady,j=d.safeguardAppliedCompanyId,C=d.targetCompanyId,g=d.resetSafeguard,y=r.useMemo((function(){return{companies:q,canViewCompanies:c,isSafeguardReady:m,safeguardAppliedCompanyId:j,targetCompanyId:C,resetSafeguard:g}}),[q,c,m,j,C,g]);return e.jsx(i.CompanySafeguardContext.Provider,{value:y,children:a})};n.displayName="CompanySafeguardWrapper",exports.CompanySafeguardWrapper=n;
//# sourceMappingURL=CompanySafeguardWrapper.js.map
