package androidx.lifecycle;

import java.util.HashMap;
import java.util.List;
import n2.C2616g;

/* JADX INFO: renamed from: androidx.lifecycle.h, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1099h implements InterfaceC1111u {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f12171a = 0;

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

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

    public C1099h(DefaultLifecycleObserver defaultLifecycleObserver, InterfaceC1111u interfaceC1111u) {
        kotlin.jvm.internal.o.h(defaultLifecycleObserver, "defaultLifecycleObserver");
        this.f12172b = defaultLifecycleObserver;
        this.f12173c = interfaceC1111u;
    }

    @Override // androidx.lifecycle.InterfaceC1111u
    public final void a(InterfaceC1113w interfaceC1113w, EnumC1107p enumC1107p) {
        switch (this.f12171a) {
            case 0:
                int i6 = AbstractC1098g.f12170a[enumC1107p.ordinal()];
                DefaultLifecycleObserver defaultLifecycleObserver = (DefaultLifecycleObserver) this.f12172b;
                switch (i6) {
                    case 1:
                        defaultLifecycleObserver.onCreate(interfaceC1113w);
                        break;
                    case 2:
                        defaultLifecycleObserver.onStart(interfaceC1113w);
                        break;
                    case 3:
                        defaultLifecycleObserver.onResume(interfaceC1113w);
                        break;
                    case 4:
                        defaultLifecycleObserver.onPause(interfaceC1113w);
                        break;
                    case 5:
                        defaultLifecycleObserver.onStop(interfaceC1113w);
                        break;
                    case 6:
                        defaultLifecycleObserver.onDestroy(interfaceC1113w);
                        break;
                    case 7:
                        throw new IllegalArgumentException("ON_ANY must not been send by anybody");
                    default:
                        throw new E3.v();
                }
                InterfaceC1111u interfaceC1111u = (InterfaceC1111u) this.f12173c;
                if (interfaceC1111u != null) {
                    interfaceC1111u.a(interfaceC1113w, enumC1107p);
                    return;
                }
                return;
            case 1:
                if (enumC1107p == EnumC1107p.ON_START) {
                    ((r) this.f12172b).removeObserver(this);
                    ((C2616g) this.f12173c).d();
                    return;
                }
                return;
            default:
                HashMap map = ((C1094c) this.f12173c).f12158a;
                List list = (List) map.get(enumC1107p);
                InterfaceC1112v interfaceC1112v = (InterfaceC1112v) this.f12172b;
                C1094c.a(list, interfaceC1113w, enumC1107p, interfaceC1112v);
                C1094c.a((List) map.get(EnumC1107p.ON_ANY), interfaceC1113w, enumC1107p, interfaceC1112v);
                return;
        }
    }

    public C1099h(InterfaceC1112v interfaceC1112v) {
        this.f12172b = interfaceC1112v;
        C1096e c1096e = C1096e.f12165c;
        Class<?> cls = interfaceC1112v.getClass();
        C1094c c1094c = (C1094c) c1096e.f12166a.get(cls);
        this.f12173c = c1094c == null ? c1096e.a(cls, null) : c1094c;
    }

    public C1099h(r rVar, C2616g c2616g) {
        this.f12172b = rVar;
        this.f12173c = c2616g;
    }
}
