import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{jsx as t}from"react/jsx-runtime";import{useRef as o}from"react";import{isEqual as l}from"lodash";import{createPickerPropsStore as s}from"./createPickerPropsStore.js";import{PickerPropsStoreContext as i}from"./PickerPropsStoreContext.js";import{getEffectiveIsLoadAllWells as n}from"./utils/getEffectiveIsLoadAllWells.js";import{useSyncProps as a}from"../utils/useSyncProps.js";import{useStableCallback as u}from"../utils/useStableCallback.js";import"../../viewport/ViewportProvider.js";import{useViewType as f}from"../../viewport/useViewType.js";var c=["children"];function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function y(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var m=function(e){var p=e.children,m=r(e,c),d=o(null),b=f().isMobile,j=u(m.onSave),O=u(m.onClose),k=u(m.addWellsUsabilityInfo);return d.current||(d.current=s(y(y({},m),{},{onSave:j,onClose:O,addWellsUsabilityInfo:k})),b&&d.current.setState({isLoadAllWells:!1})),a(d.current,m,[{key:"segment"},{key:"open"},{key:"isViewOnly"},{key:"isWDUser"},{key:"defaultSubjectWell",equals:l},{key:"offsetSettings",equals:l},{key:"currentUser",equals:l},{key:"maxOffsetSize"},{key:"localMaxOffsetSize"},{key:"syncAutoEnabled"},{key:"isManualWellsEnabled"},{key:"isGlobalMode"},{key:"loadAllWellsByDefault"},{key:"additionalFilterControls",equals:l,transform:function(e){return null!=e?e:[]}},{key:"isLoadAllWells",transform:function(e,r){var t;return!b&&n({offsetSettingsIsLoadAllWells:null===(t=r.offsetSettings)||void 0===t?void 0:t.isLoadAllWells,loadAllWellsByDefault:r.loadAllWellsByDefault,isGlobalMode:r.isGlobalMode})}}]),t(i.Provider,{value:d.current,children:p})};export{m as PickerPropsStoreProvider};
//# sourceMappingURL=PickerPropsStoreProvider.js.map
