const intialState = {
  isVisible: false,
  modalName: "DOCUMENT_UPLOAD_PENDING",
};

export default (state = intialState, action) => {
  switch (action.type) {
    case "GLOBAL_MODAL_SHOW":
      return { isVisible: true, modalName: action.payload };
    case "GLOBAL_MODAL_HIDE":
      return { ...state, isVisible: false };
    default:
      return state;
  }
};
