package p138.p176.p291.p295;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import p138.p176.p177.p242.p246.p251.C4303;

/* JADX INFO: renamed from: ދ.ހ.ށ.ރ.ށ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C5583<T> {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final Set<Class<? super T>> f16016;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final Set<C5598> f16017;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final int f16018;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final int f16019;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final InterfaceC5589<T> f16020;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final Set<Class<?>> f16021;

    /* JADX INFO: renamed from: ދ.ހ.ށ.ރ.ށ$ؠ, reason: contains not printable characters */
    public static class C5585<T> {

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public InterfaceC5589<T> f16026;

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final Set<Class<? super T>> f16022 = new HashSet();

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final Set<C5598> f16023 = new HashSet();

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public int f16024 = 0;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public int f16025 = 0;

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public Set<Class<?>> f16027 = new HashSet();

        public /* synthetic */ C5585(Class cls, Class[] clsArr, C5584 c5584) {
            C4303.m7008(cls, "Null interface");
            this.f16022.add(cls);
            for (Class cls2 : clsArr) {
                C4303.m7008(cls2, "Null interface");
            }
            Collections.addAll(this.f16022, clsArr);
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final C5585<T> m8948(int i) {
            if (!(this.f16024 == 0)) {
                throw new IllegalStateException("Instantiation type has already been set.");
            }
            this.f16024 = i;
            return this;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public C5585<T> m8949(InterfaceC5589<T> interfaceC5589) {
            C4303.m7008(interfaceC5589, "Null factory");
            this.f16026 = interfaceC5589;
            return this;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public C5585<T> m8950(C5598 c5598) {
            C4303.m7008(c5598, "Null dependency");
            if (!(!this.f16022.contains(c5598.f16043))) {
                throw new IllegalArgumentException("Components are not allowed to depend on interfaces they themselves provide.");
            }
            this.f16023.add(c5598);
            return this;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public C5583<T> m8951() {
            if (this.f16026 != null) {
                return new C5583<>(new HashSet(this.f16022), new HashSet(this.f16023), this.f16024, this.f16025, this.f16026, this.f16027, null);
            }
            throw new IllegalStateException("Missing required property: factory.");
        }
    }

    public /* synthetic */ C5583(Set set, Set set2, int i, int i2, InterfaceC5589 interfaceC5589, Set set3, C5584 c5584) {
        this.f16016 = Collections.unmodifiableSet(set);
        this.f16017 = Collections.unmodifiableSet(set2);
        this.f16018 = i;
        this.f16019 = i2;
        this.f16020 = interfaceC5589;
        this.f16021 = Collections.unmodifiableSet(set3);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> C5585<T> m8945(Class<T> cls) {
        return new C5585<>(cls, new Class[0], null);
    }

    @SafeVarargs
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> C5583<T> m8946(final T t, Class<T> cls, Class<? super T>... clsArr) {
        HashSet hashSet = new HashSet();
        HashSet hashSet2 = new HashSet();
        int i = 0;
        HashSet hashSet3 = new HashSet();
        C4303.m7008(cls, "Null interface");
        hashSet.add(cls);
        for (Class<? super T> cls2 : clsArr) {
            C4303.m7008(cls2, "Null interface");
        }
        Collections.addAll(hashSet, clsArr);
        InterfaceC5589 interfaceC5589 = new InterfaceC5589(t) { // from class: ދ.ހ.ށ.ރ.ؠ

            /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
            public final Object f16014;

            {
                this.f16014 = t;
            }

            @Override // p138.p176.p291.p295.InterfaceC5589
            /* JADX INFO: renamed from: ֏ */
            public Object mo8939(InterfaceC5586 interfaceC5586) {
                return this.f16014;
            }
        };
        C4303.m7008(interfaceC5589, "Null factory");
        if (1 != 0) {
            return new C5583<>(new HashSet(hashSet), new HashSet(hashSet2), i, i, interfaceC5589, hashSet3, null);
        }
        throw new IllegalStateException("Missing required property: factory.");
    }

    public String toString() {
        return "Component<" + Arrays.toString(this.f16016.toArray()) + ">{" + this.f16018 + ", type=" + this.f16019 + ", deps=" + Arrays.toString(this.f16017.toArray()) + "}";
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public boolean m8947() {
        return this.f16019 == 0;
    }
}
