import e from"@babel/runtime/helpers/slicedToArray";import{useRef as o,useState as r,useCallback as t,useMemo as i}from"react";import{usePickerPropsStore as s}from"../../../../stores/picker-props-store/usePickerPropsStore.js";import{useTileLoading as l}from"../../../../hooks/useTileLoading.js";import{useViewStore as n}from"../../../../stores/view-store/useViewStore.js";import{useFilterStore as u}from"../../../../stores/filter-store/useFilterStore.js";import{DEFAULT_RADIUS_MILES as a}from"../../../../constants.js";import{toCoordinates as c}from"../utils/toCoordinates.js";import{useRadiusCircle as d}from"./useRadiusCircle.js";import{useSelectionToast as p}from"./useSelectionToast.js";var m=function(m){var f,v,S=s((function(e){return e.isViewOnly})),j=null!==(f=u((function(e){var o;return null===(o=e.filters)||void 0===o?void 0:o.radius})))&&void 0!==f?f:a,y=null!==(v=u((function(e){var o;return null===(o=e.filters)||void 0===o?void 0:o.selectionMode})))&&void 0!==v?v:"radius",L=n((function(e){return e.mapStyle})),M=n((function(e){return e.setMapStyle})),w="satellite"===L,W=o(null),h=l(),C=s((function(e){return e.isLoadAllWells})),R=s((function(e){return e.allWellsLoadProgress})),b=C&&R&&!R.isComplete,g=r(!1),A=e(g,2),O=A[0],T=A[1],k=p(),P=k.toast,V=k.showSelectionResult,G=t((function(){return T(!0)}),[]),H=i((function(){var e;return null!=m&&null!==(e=m.topHole)&&void 0!==e&&e.coordinates?c(m.topHole.coordinates):null}),[m]);return{isViewOnly:S,radius:j,selectionMode:y,mapStyle:L,setMapStyle:M,isSatellite:w,mapRef:W,isTileLoading:h,isLoadAllWells:C,isAllWellsLoading:b,isMapReady:O,toast:P,showSelectionResult:V,handleMapLoad:G,subjectWellCoords:H,circleGeoJSON:d({subjectWellCoords:H,radiusMiles:j}).circleGeoJSON}};export{m as useMapStoreSelectors};
//# sourceMappingURL=useMapStoreSelectors.js.map
