ct";

const {
  actions,
  treeMapDisplays,
} = require("devtools/client/memory/constants");
const DEFAULT_TREE_MAP_DISPLAY = treeMapDisplays.coarseType;

const handlers = Object.create(null);

handlers[actions.SET_TREE_MAP_DISPLAY] = function(_, { display }) {
  return display;
};

module.exports = function(state = DEFAULT_TREE_MAP_DISPLAY, action) {
  const handler = handlers[action.type];
  return handler ? handler(state, action) : state;
};
PK