/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.android.gnd.ui.editobservation;

import android.app.Application;
import androidx.lifecycle.MutableLiveData;
import com.google.android.gnd.rx.Nil;
import javax.inject.Inject;

public class MultipleChoiceFieldViewModel extends AbstractFieldViewModel {

  private final MutableLiveData<Nil> showDialogClicks = new MutableLiveData<>();

  @Inject
  MultipleChoiceFieldViewModel(Application application) {
    super(application);
  }

  public void onShowDialog() {
    showDialogClicks.setValue(Nil.NIL);
  }

  MutableLiveData<Nil> getShowDialogClicks() {
    return showDialogClicks;
  }
}

@@ -750,13 +750,113 @@
 gnd.
-rx.Ni
+model.observation.MultipleChoiceResponse;%0Aimport com.google.android.gnd.rx.Nil;%0Aimport java8.util.Optiona
 l;%0Ai
@@ -1293,11 +1293,232 @@
 cks;%0A  %7D
+%0A%0A  Optional%3CMultipleChoiceResponse%3E getCurrentResponse() %7B%0A    return getResponse().getValue() == null%0A        ? Optional.empty()%0A        : getResponse().getValue().map(response -%3E (MultipleChoiceResponse) response);%0A  %7D
 %0A%7D%0A

Add helper method to VM