package o; import android.os.Bundle; import androidx.lifecycle.SavedStateHandleController; import o.VLM; /* loaded from: classes.dex */ public abstract class Coc extends VLM.RVV implements VLM.LWm { private FNE b; private wdQ d; private Bundle e; protected abstract T b(Class cls, NER ner); public Coc() { } public Coc(InterfaceC9254dgJ interfaceC9254dgJ, Bundle bundle) { this.b = interfaceC9254dgJ.getSavedStateRegistry(); this.d = interfaceC9254dgJ.getLifecycle(); this.e = bundle; } @Override // o.VLM.LWm public final T create(Class cls, CWH cwh) { String str = (String) cwh.d(VLM.IeS.c); if (str == null) { throw new IllegalStateException("VIEW_MODEL_KEY must always be provided by ViewModelProvider"); } if (this.b != null) { return (T) a(str, cls); } return (T) b(cls, HLt.a(cwh)); } private T a(String str, Class cls) { SavedStateHandleController zs_ = C14821gNe.zs_(this.b, this.d, str, this.e); T t = (T) b(cls, zs_.d); t.setTagIfAbsent("androidx.lifecycle.savedstate.vm.tag", zs_); return t; } @Override // o.VLM.LWm public final T create(Class cls) { String canonicalName = cls.getCanonicalName(); if (canonicalName == null) { throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels"); } if (this.d == null) { throw new UnsupportedOperationException("AbstractSavedStateViewModelFactory constructed with empty constructor supports only calls to create(modelClass: Class, extras: CreationExtras)."); } return (T) a(canonicalName, cls); } @Override // o.VLM.RVV public final void e(VKL vkl) { FNE fne = this.b; if (fne != null) { C14821gNe.c(vkl, fne, this.d); } } }