package F1;

import android.view.View;
import android.view.ViewGroup;
import java.util.Iterator;
import java.util.NoSuchElementException;
import k5.C2433v;
import x4.AbstractC3239e;

/* JADX INFO: loaded from: classes.dex */
public class I implements Iterator, K4.a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f1371a;

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

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

    public /* synthetic */ I(Object obj, int i6) {
        this.f1371a = i6;
        this.f1373c = obj;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        switch (this.f1371a) {
            case 0:
                if (this.f1372b < ((ViewGroup) this.f1373c).getChildCount()) {
                }
                break;
            case 1:
                if (this.f1372b > 0) {
                }
                break;
            case 2:
                if (this.f1372b < ((double[]) this.f1373c).length) {
                }
                break;
            case 3:
                if (this.f1372b < ((float[]) this.f1373c).length) {
                }
                break;
            case 4:
                if (this.f1372b < ((Object[]) this.f1373c).length) {
                }
                break;
            case 5:
                if (this.f1372b < ((n.e0) this.f1373c).e()) {
                }
                break;
            case 6:
                if (this.f1372b < ((byte[]) this.f1373c).length) {
                }
                break;
            case 7:
                if (this.f1372b < ((int[]) this.f1373c).length) {
                }
                break;
            case 8:
                if (this.f1372b < ((long[]) this.f1373c).length) {
                }
                break;
            case 9:
                if (this.f1372b < ((short[]) this.f1373c).length) {
                }
                break;
            default:
                if (this.f1372b < ((AbstractC3239e) this.f1373c).size()) {
                }
                break;
        }
        return false;
    }

    @Override // java.util.Iterator
    public final Object next() {
        switch (this.f1371a) {
            case 0:
                int i6 = this.f1372b;
                this.f1372b = i6 + 1;
                View childAt = ((ViewGroup) this.f1373c).getChildAt(i6);
                if (childAt != null) {
                    return childAt;
                }
                throw new IndexOutOfBoundsException();
            case 1:
                C2433v c2433v = (C2433v) this.f1373c;
                int i7 = this.f1372b;
                this.f1372b = i7 - 1;
                return c2433v.f20022e[c2433v.f20020c - i7];
            case 2:
                try {
                    double[] dArr = (double[]) this.f1373c;
                    int i8 = this.f1372b;
                    this.f1372b = i8 + 1;
                    return Double.valueOf(dArr[i8]);
                } catch (ArrayIndexOutOfBoundsException e6) {
                    this.f1372b--;
                    throw new NoSuchElementException(e6.getMessage());
                }
            case 3:
                try {
                    float[] fArr = (float[]) this.f1373c;
                    int i9 = this.f1372b;
                    this.f1372b = i9 + 1;
                    return Float.valueOf(fArr[i9]);
                } catch (ArrayIndexOutOfBoundsException e7) {
                    this.f1372b--;
                    throw new NoSuchElementException(e7.getMessage());
                }
            case 4:
                try {
                    Object[] objArr = (Object[]) this.f1373c;
                    int i10 = this.f1372b;
                    this.f1372b = i10 + 1;
                    return objArr[i10];
                } catch (ArrayIndexOutOfBoundsException e8) {
                    this.f1372b--;
                    throw new NoSuchElementException(e8.getMessage());
                }
            case 5:
                int i11 = this.f1372b;
                this.f1372b = i11 + 1;
                return ((n.e0) this.f1373c).f(i11);
            case 6:
                int i12 = this.f1372b;
                byte[] bArr = (byte[]) this.f1373c;
                if (i12 >= bArr.length) {
                    throw new NoSuchElementException(String.valueOf(this.f1372b));
                }
                this.f1372b = i12 + 1;
                return new w4.r(bArr[i12]);
            case 7:
                int i13 = this.f1372b;
                int[] iArr = (int[]) this.f1373c;
                if (i13 >= iArr.length) {
                    throw new NoSuchElementException(String.valueOf(this.f1372b));
                }
                this.f1372b = i13 + 1;
                return new w4.t(iArr[i13]);
            case 8:
                int i14 = this.f1372b;
                long[] jArr = (long[]) this.f1373c;
                if (i14 >= jArr.length) {
                    throw new NoSuchElementException(String.valueOf(this.f1372b));
                }
                this.f1372b = i14 + 1;
                return new w4.v(jArr[i14]);
            case 9:
                int i15 = this.f1372b;
                short[] sArr = (short[]) this.f1373c;
                if (i15 >= sArr.length) {
                    throw new NoSuchElementException(String.valueOf(this.f1372b));
                }
                this.f1372b = i15 + 1;
                return new w4.y(sArr[i15]);
            default:
                if (!hasNext()) {
                    throw new NoSuchElementException();
                }
                int i16 = this.f1372b;
                this.f1372b = i16 + 1;
                return ((AbstractC3239e) this.f1373c).get(i16);
        }
    }

    @Override // java.util.Iterator
    public final void remove() {
        switch (this.f1371a) {
            case 0:
                int i6 = this.f1372b - 1;
                this.f1372b = i6;
                ((ViewGroup) this.f1373c).removeViewAt(i6);
                return;
            case 1:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 2:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 3:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 4:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 5:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 6:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 7:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 8:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 9:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            default:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
        }
    }

    public I(Object[] array) {
        this.f1371a = 4;
        kotlin.jvm.internal.o.h(array, "array");
        this.f1373c = array;
    }

    public I(float[] array) {
        this.f1371a = 3;
        kotlin.jvm.internal.o.h(array, "array");
        this.f1373c = array;
    }

    public I(double[] array) {
        this.f1371a = 2;
        kotlin.jvm.internal.o.h(array, "array");
        this.f1373c = array;
    }

    public I(C2433v c2433v) {
        this.f1371a = 1;
        this.f1373c = c2433v;
        this.f1372b = c2433v.f20020c;
    }
}
