package h; import android.view.View; import android.view.animation.Interpolator; import androidx.core.view.w0; import androidx.core.view.x0; import androidx.core.view.y0; import java.util.ArrayList; import java.util.Iterator; /* loaded from: classes.dex */ public class h { /* renamed from: c, reason: collision with root package name */ private Interpolator f9927c; /* renamed from: d, reason: collision with root package name */ x0 f9928d; /* renamed from: e, reason: collision with root package name */ private boolean f9929e; /* renamed from: b, reason: collision with root package name */ private long f9926b = -1; /* renamed from: f, reason: collision with root package name */ private final y0 f9930f = new a(); /* renamed from: a, reason: collision with root package name */ final ArrayList f9925a = new ArrayList(); class a extends y0 { /* renamed from: a, reason: collision with root package name */ private boolean f9931a = false; /* renamed from: b, reason: collision with root package name */ private int f9932b = 0; a() { } @Override // androidx.core.view.x0 public void b(View view) { int i10 = this.f9932b + 1; this.f9932b = i10; if (i10 == h.this.f9925a.size()) { x0 x0Var = h.this.f9928d; if (x0Var != null) { x0Var.b(null); } d(); } } @Override // androidx.core.view.y0, androidx.core.view.x0 public void c(View view) { if (this.f9931a) { return; } this.f9931a = true; x0 x0Var = h.this.f9928d; if (x0Var != null) { x0Var.c(null); } } void d() { this.f9932b = 0; this.f9931a = false; h.this.b(); } } public void a() { if (this.f9929e) { Iterator it = this.f9925a.iterator(); while (it.hasNext()) { ((w0) it.next()).b(); } this.f9929e = false; } } void b() { this.f9929e = false; } public h c(w0 w0Var) { if (!this.f9929e) { this.f9925a.add(w0Var); } return this; } public h d(w0 w0Var, w0 w0Var2) { this.f9925a.add(w0Var); w0Var2.h(w0Var.c()); this.f9925a.add(w0Var2); return this; } public h e(long j10) { if (!this.f9929e) { this.f9926b = j10; } return this; } public h f(Interpolator interpolator) { if (!this.f9929e) { this.f9927c = interpolator; } return this; } public h g(x0 x0Var) { if (!this.f9929e) { this.f9928d = x0Var; } return this; } public void h() { if (this.f9929e) { return; } Iterator it = this.f9925a.iterator(); while (it.hasNext()) { w0 w0Var = (w0) it.next(); long j10 = this.f9926b; if (j10 >= 0) { w0Var.d(j10); } Interpolator interpolator = this.f9927c; if (interpolator != null) { w0Var.e(interpolator); } if (this.f9928d != null) { w0Var.f(this.f9930f); } w0Var.j(); } this.f9929e = true; } }