package com.bumptech.glide.load.engine;

import androidx.room.RoomDatabase;
import com.google.firebase.components.DependencyException;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import xyz.stream.api.database.entity.LiveFavorite;

/* JADX INFO: loaded from: classes.dex */
public final class p implements com.google.firebase.components.b, vf.m {

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

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

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

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

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

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

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

    public p(com.google.firebase.components.a aVar, com.google.firebase.components.h hVar) {
        HashSet hashSet = new HashSet();
        HashSet hashSet2 = new HashSet();
        HashSet hashSet3 = new HashSet();
        HashSet hashSet4 = new HashSet();
        HashSet hashSet5 = new HashSet();
        for (com.google.firebase.components.k kVar : aVar.f24004c) {
            int i10 = kVar.f24027c;
            boolean z10 = i10 == 0;
            int i11 = kVar.f24026b;
            com.google.firebase.components.p pVar = kVar.f24025a;
            if (z10) {
                if (i11 == 2) {
                    hashSet4.add(pVar);
                } else {
                    hashSet.add(pVar);
                }
            } else if (i10 == 2) {
                hashSet3.add(pVar);
            } else if (i11 == 2) {
                hashSet5.add(pVar);
            } else {
                hashSet2.add(pVar);
            }
        }
        Set set = aVar.f24008g;
        if (!set.isEmpty()) {
            hashSet.add(com.google.firebase.components.p.a(db.b.class));
        }
        this.f5756a = Collections.unmodifiableSet(hashSet);
        this.f5757b = Collections.unmodifiableSet(hashSet2);
        this.f5758c = Collections.unmodifiableSet(hashSet3);
        this.f5759d = Collections.unmodifiableSet(hashSet4);
        this.f5760e = Collections.unmodifiableSet(hashSet5);
        this.f5761f = set;
        this.f5762g = hVar;
    }

    @Override // com.google.firebase.components.b
    public final gb.a a(com.google.firebase.components.p pVar) {
        if (((Set) this.f5757b).contains(pVar)) {
            return ((com.google.firebase.components.b) this.f5762g).a(pVar);
        }
        throw new DependencyException(String.format("Attempting to request an undeclared dependency Provider<%s>.", pVar));
    }

    @Override // com.google.firebase.components.b
    public final gb.a b(Class cls) {
        return a(com.google.firebase.components.p.a(cls));
    }

    @Override // com.google.firebase.components.b
    public final Set c(com.google.firebase.components.p pVar) {
        if (((Set) this.f5759d).contains(pVar)) {
            return ((com.google.firebase.components.b) this.f5762g).c(pVar);
        }
        throw new DependencyException(String.format("Attempting to request an undeclared dependency Set<%s>.", pVar));
    }

    @Override // com.google.firebase.components.b
    public final gb.a d(com.google.firebase.components.p pVar) {
        if (((Set) this.f5760e).contains(pVar)) {
            return ((com.google.firebase.components.b) this.f5762g).d(pVar);
        }
        throw new DependencyException(String.format("Attempting to request an undeclared dependency Provider<Set<%s>>.", pVar));
    }

    @Override // com.google.firebase.components.b
    public final Object e(com.google.firebase.components.p pVar) {
        if (((Set) this.f5756a).contains(pVar)) {
            return ((com.google.firebase.components.b) this.f5762g).e(pVar);
        }
        throw new DependencyException(String.format("Attempting to request an undeclared dependency %s.", pVar));
    }

    public final List f(String str) {
        return (List) androidx.room.util.b.b((RoomDatabase) this.f5756a, true, false, new h3.b(str, 1));
    }

    public final LiveFavorite g(int i10, String str) {
        return (LiveFavorite) androidx.room.util.b.b((RoomDatabase) this.f5756a, true, false, new vf.b(i10, 1, str));
    }

    @Override // com.google.firebase.components.b
    public final Object get(Class cls) {
        if (!((Set) this.f5756a).contains(com.google.firebase.components.p.a(cls))) {
            throw new DependencyException(String.format("Attempting to request an undeclared dependency %s.", cls));
        }
        Object obj = ((com.google.firebase.components.b) this.f5762g).get(cls);
        if (!cls.equals(db.b.class)) {
            return obj;
        }
        return new com.google.firebase.components.q();
    }

    public p(RoomDatabase roomDatabase) {
        this.f5756a = roomDatabase;
        this.f5757b = new vf.p(0);
        this.f5758c = new vf.p(1);
        this.f5759d = new vf.q(0);
        this.f5760e = new vf.q(1);
        this.f5761f = new vf.q(2);
        this.f5762g = new vf.q(3);
    }

    public p(e5.d dVar, e5.d dVar2, e5.d dVar3, e5.d dVar4, v vVar, x xVar) {
        this.f5762g = u5.d.a(150, new xyz.stream.api.a0(this, 12));
        this.f5756a = dVar;
        this.f5757b = dVar2;
        this.f5758c = dVar3;
        this.f5759d = dVar4;
        this.f5760e = vVar;
        this.f5761f = xVar;
    }
}
