package com.robotsandpencils.testapp.tab2;

import android.os.Bundle;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.navigation.NavDirections;
import com.robotsandpencils.testapp.ToolbarType;
import java.io.Serializable;
import java.lang.IllegalArgumentException;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.HashMap;

public class Tab2FragmentDirections {
  private Tab2FragmentDirections() {
  }

  @NonNull
  public static ActionTab2ToGlobal actionTab2ToGlobal() {
    return new ActionTab2ToGlobal();
  }

  @NonNull
  public static com.robotsandpencils.testapp.Tab2FragmentDirections.com.robotsandpencils.testapp.NavGraphDirections.ActionGlobalGlobalFragment actionGlobalGlobalFragment() {
    return com.robotsandpencils.testapp.Tab2FragmentDirections.actionGlobalGlobalFragment();
  }

  public static class ActionTab2ToGlobal implements NavDirections {
    private final HashMap arguments = new HashMap();

    private ActionTab2ToGlobal() {
    }

    @NonNull
    public ActionTab2ToGlobal setToolbarType(@NonNull ToolbarType ToolbarType) {
      if (ToolbarType == null) {
        throw new IllegalArgumentException("Argument \"ToolbarType\" is marked as non-null but was passed a null value.");
      }
      this.arguments.put("ToolbarType", ToolbarType);
      return this;
    }

    @Override
    @SuppressWarnings("unchecked")
    @NonNull
    public Bundle getArguments() {
      Bundle __result = new Bundle();
      if (arguments.containsKey("ToolbarType")) {
        ToolbarType ToolbarType = (ToolbarType) arguments.get("ToolbarType");
        if (Parcelable.class.isAssignableFrom(ToolbarType.class) || ToolbarType == null) {
          __result.putParcelable("ToolbarType", Parcelable.class.cast(ToolbarType));
        } else if (Serializable.class.isAssignableFrom(ToolbarType.class)) {
          __result.putSerializable("ToolbarType", Serializable.class.cast(ToolbarType));
        } else {
          throw new UnsupportedOperationException(ToolbarType.class.getName() + " must implement Parcelable or Serializable or must be an Enum.");
        }
      }
      return __result;
    }

    @Override
    public int getActionId() {
      return com.robotsandpencils.testapp.R.id.action_tab2_to_global;
    }

    @SuppressWarnings("unchecked")
    @NonNull
    public ToolbarType getToolbarType() {
      return (ToolbarType) arguments.get("ToolbarType");
    }

    @Override
    public boolean equals(Object object) {
      if (this == object) {
          return true;
      }
      if (object == null || getClass() != object.getClass()) {
          return false;
      }
      ActionTab2ToGlobal that = (ActionTab2ToGlobal) object;
      if (arguments.containsKey("ToolbarType") != that.arguments.containsKey("ToolbarType")) {
        return false;
      }
      if (getToolbarType() != null ? !getToolbarType().equals(that.getToolbarType()) : that.getToolbarType() != null) {
        return false;
      }
      if (getActionId() != that.getActionId()) {
        return false;
      }
      return true;
    }

    @Override
    public int hashCode() {
      int result = 1;
      result = 31 * result + (getToolbarType() != null ? getToolbarType().hashCode() : 0);
      result = 31 * result + getActionId();
      return result;
    }

    @Override
    public String toString() {
      return "ActionTab2ToGlobal(actionId=" + getActionId() + "){"
          + "ToolbarType=" + getToolbarType()
          + "}";
    }
  }
}
