package defpackage;

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

/* renamed from: ᵚˆﾞ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2649 implements Iterator, InterfaceC3996 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public Iterator f10257;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f10258;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final Object f10259;

    public C2649(C0777 c0777) {
        this.f10258 = 1;
        this.f10259 = new ArrayList();
        this.f10257 = c0777;
    }

    public C2649(C4540 c4540) {
        this.f10258 = 0;
        this.f10259 = c4540;
        this.f10257 = ((InterfaceC5533) c4540.f16891).iterator();
    }

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

    @Override // java.util.Iterator
    public final Object next() {
        int i = this.f10258;
        Object obj = this.f10259;
        switch (i) {
            case 0:
                return ((InterfaceC0362) ((C4540) obj).f16889).mo1588(this.f10257.next());
            default:
                Object next = this.f10257.next();
                ArrayList arrayList = (ArrayList) obj;
                View view = (View) next;
                ViewGroup viewGroup = view instanceof ViewGroup ? (ViewGroup) view : null;
                C0777 c0777 = viewGroup != null ? new C0777(3, viewGroup) : null;
                if (c0777 == null || !c0777.hasNext()) {
                    while (!this.f10257.hasNext() && !arrayList.isEmpty()) {
                        this.f10257 = (Iterator) AbstractC2767.m6828(arrayList);
                        AbstractC2767.m6827(arrayList);
                    }
                } else {
                    arrayList.add(this.f10257);
                    this.f10257 = c0777;
                }
                return next;
        }
    }

    @Override // java.util.Iterator
    public final void remove() {
        switch (this.f10258) {
            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");
        }
    }
}
