package o;

import android.app.Application;
import android.content.Context;
import android.content.ContextWrapper;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class CC implements IE, InterfaceC1925n40, InterfaceC1508ik0 {
    public final androidx.fragment.app.l l;
    public final C1413hk0 m;
    public C1089eL n = null;

    /* renamed from: o, reason: collision with root package name */
    public C1735l40 f66o = null;

    public CC(androidx.fragment.app.l lVar, C1413hk0 c1413hk0) {
        this.l = lVar;
        this.m = c1413hk0;
    }

    public final void a(UK uk) {
        this.n.f(uk);
    }

    public final void b() {
        if (this.n == null) {
            this.n = new C1089eL(this);
            C1830m40 c1830m40 = new C1830m40(this, new C1164f5(16, this));
            this.f66o = new C1735l40(c1830m40);
            c1830m40.a();
            AbstractC2378rs0.K(this);
        }
    }

    @Override // o.IE
    public final AbstractC0118Eo getDefaultViewModelCreationExtras() {
        Application application;
        androidx.fragment.app.l lVar = this.l;
        Context applicationContext = lVar.requireContext().getApplicationContext();
        while (true) {
            if (!(applicationContext instanceof ContextWrapper)) {
                application = null;
                break;
            }
            if (applicationContext instanceof Application) {
                application = (Application) applicationContext;
                break;
            }
            applicationContext = ((ContextWrapper) applicationContext).getBaseContext();
        }
        FQ fq = new FQ(0);
        if (application != null) {
            fq.a(C1125ek0.d, application);
        }
        fq.a(AbstractC2378rs0.f, this);
        fq.a(AbstractC2378rs0.g, this);
        if (lVar.getArguments() != null) {
            fq.a(AbstractC2378rs0.h, lVar.getArguments());
        }
        return fq;
    }

    @Override // o.InterfaceC0898cL
    public final WK getLifecycle() {
        b();
        return this.n;
    }

    @Override // o.InterfaceC1925n40
    public final C1640k40 getSavedStateRegistry() {
        b();
        return this.f66o.b;
    }

    @Override // o.InterfaceC1508ik0
    public final C1413hk0 getViewModelStore() {
        b();
        return this.m;
    }
}
