export default {
    name: "zoomLevel",
  
    getReducer: () => {
      const initialData = {
        zoomLevelIndicator: false,
      };
      return (state = initialData, { type, payload }) => {
        switch (type) {
          case "ACTIVATE_ZOOM_INDICATOR":
          case "DEACTIVATE_ZOOM_INDICATOR":
            return Object.assign({}, state, payload);
          default:
            return state;
        }
      };
    },
  
    doZoomIndicatorActivate: () => ({ dispatch, store }) => {
      dispatch({
        type: "ACTIVATE_ZOOM_INDICATOR",
        payload: {
            zoomLevelIndicator: true,
        },
      });
    },
  
    selectZoomLevelIndicator: (state) => {
      return state.zoomLevel.zoomLevelIndicator;
    },
  };
  