"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var l=require("zustand"),e=require("lodash"),s=require("./utils/getEffectiveIsLoadAllWells.js");exports.createPickerPropsStore=function(o){var t,a=s.getEffectiveIsLoadAllWells({offsetSettingsIsLoadAllWells:null===(t=o.offsetSettings)||void 0===t?void 0:t.isLoadAllWells,loadAllWellsByDefault:o.loadAllWellsByDefault,isGlobalMode:o.isGlobalMode});return l.createStore()((function(l){var t,i,n,d,r,u,f,W,c,v;return{segment:null!==(t=o.segment)&&void 0!==t?t:"drilling",open:o.open,defaultSubjectWell:o.defaultSubjectWell,offsetSettings:o.offsetSettings,currentUser:o.currentUser,addWellsUsabilityInfo:null!==(i=o.addWellsUsabilityInfo)&&void 0!==i?i:e.identity,onSave:o.onSave,onClose:o.onClose,isViewOnly:null!==(n=o.isViewOnly)&&void 0!==n&&n,isWDUser:null!==(d=o.isWDUser)&&void 0!==d&&d,maxOffsetSize:null!==(r=o.maxOffsetSize)&&void 0!==r?r:50,localMaxOffsetSize:null!==(u=o.localMaxOffsetSize)&&void 0!==u?u:50,syncAutoEnabled:null!==(f=o.syncAutoEnabled)&&void 0!==f&&f,isManualWellsEnabled:null!==(W=o.isManualWellsEnabled)&&void 0!==W&&W,isGlobalMode:null!==(c=o.isGlobalMode)&&void 0!==c&&c,loadAllWellsByDefault:o.loadAllWellsByDefault,additionalFilterControls:null!==(v=o.additionalFilterControls)&&void 0!==v?v:[],isLoadAllWells:a,allWellsLoadProgress:null,shouldRecenter:!1,toggleLoadAllWells:function(){l((function(l){return{isLoadAllWells:!l.isLoadAllWells,allWellsLoadProgress:null}}))},resetIsLoadAllWells:function(){l((function(l){var e;return{isLoadAllWells:s.getEffectiveIsLoadAllWells({offsetSettingsIsLoadAllWells:null===(e=l.offsetSettings)||void 0===e?void 0:e.isLoadAllWells,loadAllWellsByDefault:l.loadAllWellsByDefault,isGlobalMode:l.isGlobalMode}),allWellsLoadProgress:null}}))},setIsLoadAllWells:function(e){l({isLoadAllWells:e,allWellsLoadProgress:null})},setAllWellsLoadProgress:function(e){l({allWellsLoadProgress:e})},setShouldRecenter:function(e){l({shouldRecenter:e})}}}))};
//# sourceMappingURL=createPickerPropsStore.js.map
