import _objectSpread from "@babel/runtime/helpers/objectSpread";
import { reducerWithInitialState } from 'typescript-fsa-reducers';
import { combineEpics } from 'redux-observable';
import actionCreatorFactory from 'typescript-fsa';
export var initialState = {
  isCompatibleMode: false,
  assetPackage: {
    version: '',
    categories: [],
    scopes: [],
    module: {},
    buttons: []
  },
  plan: 'debug'
};
var actionCreator = actionCreatorFactory('ide/asset');
export var actions = {
  setPackage: actionCreator('SET_PACKAGE'),
  setPlan: actionCreator('SET_PLAN'),
  setCompatibleMode: actionCreator('SET_COMPATIBLE_MODE')
};
export var epics = combineEpics();
export default reducerWithInitialState(initialState).case(actions.setPackage, function (state, payload) {
  return _objectSpread({}, state, {
    assetPackage: payload
  });
}).case(actions.setPlan, function (state, payload) {
  return _objectSpread({}, state, {
    plan: payload
  });
}).case(actions.setCompatibleMode, function (state, payload) {
  return _objectSpread({}, state, {
    isCompatibleMode: payload
  });
});