package F;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class Y implements J4.c {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ b0 f1236b;

    public /* synthetic */ Y(b0 b0Var, int i6) {
        this.f1235a = i6;
        this.f1236b = b0Var;
    }

    @Override // J4.c
    public final Object invoke(Object obj) {
        switch (this.f1235a) {
            case 0:
                B b5 = (B) this.f1236b.f1255a.invoke();
                int iA = b5.a();
                int i6 = 0;
                while (true) {
                    if (i6 >= iA) {
                        i6 = -1;
                    } else if (!b5.b(i6).equals(obj)) {
                        i6++;
                    }
                }
                return Integer.valueOf(i6);
            default:
                int iIntValue = ((Integer) obj).intValue();
                b0 b0Var = this.f1236b;
                B b6 = (B) b0Var.f1255a.invoke();
                if (iIntValue < 0 || iIntValue >= b6.a()) {
                    StringBuilder sbR = com.google.android.recaptcha.internal.a.r(iIntValue, "Can't scroll to index ", ", it is out of bounds [0, ");
                    sbR.append(b6.a());
                    sbR.append(')');
                    A.b.a(sbR.toString());
                }
                V4.E.y(b0Var.getCoroutineScope(), null, null, new a0(b0Var, iIntValue, null), 3);
                return Boolean.TRUE;
        }
    }
}
