const intialState = {
  activityInfo: {
    activityID: "",
    activityTypeId: "",
    licensePlateNumber: "",
    toWithQuote: false,
    toTutorial: false,
    quoteNumber: "",
  },
};

const clearState = {
  activityInfo: {
    activityID: "",
    activityTypeId: "",
    licensePlateNumber: "",
    toWithQuote: false,
    toTutorial: false,
    quoteNumber: "",
  },
};

export default (state = intialState, action) => {
  switch (action.type) {
    case "ACTIVITY_DATA":
      return { ...state, activityInfo: action.payload };
    case "CLEAR_ACTIVITY_DATA":
      return clearState;
    default:
      return state;
  }
};
