package N1;

import android.util.Log;
import android.view.animation.BaseInterpolator;
import androidx.recyclerview.widget.RecyclerView;

/* JADX INFO: loaded from: classes.dex */
public final class n0 {

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

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

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public BaseInterpolator f4598e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public boolean f4599f;

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

    public final void a(RecyclerView recyclerView) {
        int i = this.f4597d;
        if (i >= 0) {
            this.f4597d = -1;
            recyclerView.S(i);
            this.f4599f = false;
            return;
        }
        if (!this.f4599f) {
            this.f4600g = 0;
            return;
        }
        BaseInterpolator baseInterpolator = this.f4598e;
        if (baseInterpolator != null && this.f4596c < 1) {
            throw new IllegalStateException("If you provide an interpolator, you must set a positive duration");
        }
        int i5 = this.f4596c;
        if (i5 < 1) {
            throw new IllegalStateException("Scroll duration must be a positive number");
        }
        recyclerView.f9081v0.c(this.f4594a, this.f4595b, i5, baseInterpolator);
        int i8 = this.f4600g + 1;
        this.f4600g = i8;
        if (i8 > 10) {
            Log.e("RecyclerView", "Smooth Scroll action is being updated too frequently. Make sure you are not changing it unless necessary");
        }
        this.f4599f = false;
    }

    public final void b(int i, int i5, int i8, BaseInterpolator baseInterpolator) {
        this.f4594a = i;
        this.f4595b = i5;
        this.f4596c = i8;
        this.f4598e = baseInterpolator;
        this.f4599f = true;
    }
}
