package d4;

import com.google.android.gms.internal.measurement.C1;
import java.util.Collections;
import java.util.HashSet;

/* JADX INFO: renamed from: d4.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0842a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public String f12239a = null;

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f12242d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public int f12243e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public d f12244f;

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

    public C0842a(Class cls, Class[] clsArr) {
        HashSet hashSet = new HashSet();
        this.f12240b = hashSet;
        this.f12241c = new HashSet();
        this.f12242d = 0;
        this.f12243e = 0;
        this.f12245g = new HashSet();
        hashSet.add(p.a(cls));
        for (Class cls2 : clsArr) {
            C1.e(cls2, "Null interface");
            this.f12240b.add(p.a(cls2));
        }
    }

    public final void a(h hVar) {
        if (this.f12240b.contains(hVar.f12266a)) {
            throw new IllegalArgumentException("Components are not allowed to depend on interfaces they themselves provide.");
        }
        this.f12241c.add(hVar);
    }

    public final C0843b b() {
        if (this.f12244f != null) {
            return new C0843b(this.f12239a, new HashSet(this.f12240b), new HashSet(this.f12241c), this.f12242d, this.f12243e, this.f12244f, this.f12245g);
        }
        throw new IllegalStateException("Missing required property: factory.");
    }

    public final void c() {
        if (!(this.f12242d == 0)) {
            throw new IllegalStateException("Instantiation type has already been set.");
        }
        this.f12242d = 2;
    }

    public C0842a(p pVar, p[] pVarArr) {
        HashSet hashSet = new HashSet();
        this.f12240b = hashSet;
        this.f12241c = new HashSet();
        this.f12242d = 0;
        this.f12243e = 0;
        this.f12245g = new HashSet();
        hashSet.add(pVar);
        for (p pVar2 : pVarArr) {
            C1.e(pVar2, "Null interface");
        }
        Collections.addAll(this.f12240b, pVarArr);
    }
}
