package v6;

import P6.n;
import android.app.Application;
import androidx.lifecycle.Z;
import com.google.android.gms.internal.measurement.C1;
import d.m;
import n4.u0;
import r0.C1484c;
import r5.C1496a;
import r5.C1498c;
import u6.C1660d;
import x6.InterfaceC1723a;
import x6.InterfaceC1724b;
import y5.AbstractActivityC1764i;

/* JADX INFO: renamed from: v6.b, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1682b implements InterfaceC1724b {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final /* synthetic */ int f18114q = 1;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final Object f18115r = new Object();

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final m f18116s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final Object f18117t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public volatile InterfaceC1723a f18118u;

    public C1682b(AbstractActivityC1764i abstractActivityC1764i) {
        this.f18116s = abstractActivityC1764i;
        this.f18117t = new C1682b((m) abstractActivityC1764i);
    }

    private final Object b() {
        if (((C1496a) this.f18118u) == null) {
            synchronized (this.f18115r) {
                try {
                    if (((C1496a) this.f18118u) == null) {
                        this.f18118u = a();
                    }
                } finally {
                }
            }
        }
        return (C1496a) this.f18118u;
    }

    public C1496a a() {
        String str;
        AbstractActivityC1764i abstractActivityC1764i = (AbstractActivityC1764i) this.f18116s;
        if (abstractActivityC1764i.getApplication() instanceof InterfaceC1724b) {
            C1498c c1498c = (C1498c) ((InterfaceC1681a) C1.u(InterfaceC1681a.class, (C1682b) this.f18117t));
            return new C1496a(c1498c.f16457a, c1498c.f16458b);
        }
        StringBuilder sb = new StringBuilder("Hilt Activity must be attached to an @HiltAndroidApp Application. ");
        if (Application.class.equals(abstractActivityC1764i.getApplication().getClass())) {
            str = "Did you forget to specify your Application's class name in your manifest's <application />'s android:name attribute?";
        } else {
            str = "Found: " + abstractActivityC1764i.getApplication().getClass();
        }
        sb.append(str);
        throw new IllegalStateException(sb.toString());
    }

    @Override // x6.InterfaceC1724b
    public final Object l() {
        switch (this.f18114q) {
            case u0.f15495q /* 0 */:
                return b();
            default:
                if (((C1498c) this.f18118u) == null) {
                    synchronized (this.f18115r) {
                        if (((C1498c) this.f18118u) == null) {
                            m mVar = this.f18116s;
                            C1660d c1660d = new C1660d(1, (m) this.f18117t);
                            Z zR = mVar.r();
                            C1484c c1484cA = mVar.a();
                            P6.g.e(zR, "store");
                            C2.a aVar = new C2.a(zR, c1660d, c1484cA);
                            P6.d dVarA = n.a(d.class);
                            String strB = dVarA.b();
                            if (strB == null) {
                                throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
                            }
                            this.f18118u = ((d) aVar.v(dVarA, "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(strB))).f18119b;
                        }
                    }
                }
                return (C1498c) this.f18118u;
        }
    }

    public C1682b(m mVar) {
        this.f18116s = mVar;
        this.f18117t = mVar;
    }
}
