import * as types from '../constants/actionTypes';

const actions: ActionType = (dispatch) => ({
  toggleDisplayMode: (state) =>
    dispatch({ type: types.TOGGLE_DISPLAY_MODE, payload: state }),
  setNavbar: (state) => dispatch({ type: types.SET_NAVBAR, payload: state }),
  setSidebar: (state) => dispatch({ type: types.SET_SIDEBAR, payload: state }),
  setTool: (state) => dispatch({ type: types.SET_TOOL, payload: state }),
  setInfo: (state) => dispatch({ type: types.SET_INFO, payload: state }),
  setLoading: (state) => dispatch({ type: types.SET_LOADING, payload: state }),
});

export default actions;
