package defpackage;

import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.Iterator;

/* JADX INFO: renamed from: ᵶʞˀᵴ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4788 implements Iterator, InterfaceC5238 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final /* synthetic */ int f18209;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final Object f18210;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public Iterator f18211;

    public C4788(C3158 c3158) {
        this.f18209 = 1;
        this.f18210 = new ArrayList();
        this.f18211 = c3158;
    }

    public C4788(C4874 c4874) {
        this.f18209 = 0;
        this.f18210 = c4874;
        this.f18211 = ((InterfaceC1631) c4874.f18571).iterator();
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        switch (this.f18209) {
        }
        return this.f18211.hasNext();
    }

    @Override // java.util.Iterator
    public final Object next() {
        int i = this.f18209;
        Object obj = this.f18210;
        switch (i) {
            case 0:
                return ((InterfaceC0778) ((C4874) obj).f18572).mo1706(this.f18211.next());
            default:
                Object next = this.f18211.next();
                ArrayList arrayList = (ArrayList) obj;
                View view = (View) next;
                ViewGroup viewGroup = view instanceof ViewGroup ? (ViewGroup) view : null;
                C3158 c3158 = viewGroup != null ? new C3158(3, viewGroup) : null;
                if (c3158 == null || !c3158.hasNext()) {
                    while (!this.f18211.hasNext() && !arrayList.isEmpty()) {
                        this.f18211 = (Iterator) AbstractC4126.m8994(arrayList);
                        AbstractC5477.m11102(arrayList);
                    }
                } else {
                    arrayList.add(this.f18211);
                    this.f18211 = c3158;
                }
                return next;
        }
    }

    @Override // java.util.Iterator
    public final void remove() {
        switch (this.f18209) {
            case 0:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            default:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
        }
    }
}
