"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _immer = require("immer");

var _scroll = require("../actions/scroll");

const defaultState = {
  isScrolling: true
};
const status = (0, _immer.produce)((state, action) => {
  switch (action.type) {
    case _scroll.TOGGLE_SCROLL:
      state.isScrolling = !state.isScrolling;
      localStorage.setItem(_scroll.SCROLL_SYNC_ENABLED, `${state.isScrolling}`);
      break;

    case _scroll.SET_SCROLL:
      state.isScrolling = action.payload;
      localStorage.setItem(_scroll.SCROLL_SYNC_ENABLED, `${state.isScrolling}`);
      break;
  }
}, defaultState);
var _default = status;
exports.default = _default;