const intialState = {
  vehicleInfo: {
    activityID: "",
    activityTypeId: "",
    licensePlateNumber: "",
    quoteNumber: "",
  },
};

const clearState = {
  vehicleInfo: {
    activityID: "",
    activityTypeId: "",
    licensePlateNumber: "",
    quoteNumber: "",
  },
};

export default (state = intialState, action) => {
  switch (action.type) {
    case "VEHICLE_DETAILS":
      return { ...state, vehicleInfo: action.payload };
    case "CLEAR_VEHICLE_DETAILS_REDUX":
      return clearState;
    default:
      return state;
  }
};
