package o; import android.graphics.Rect; import android.view.View; import android.view.ViewGroup; import androidx.recyclerview.widget.RecyclerView; import org.bouncycastle.asn1.cmp.PKIFailureInfo; /* loaded from: classes.dex */ public abstract class MSs { final Rect a; protected final RecyclerView.tOB b; public int c; public abstract int a(View view); public abstract int b(); public abstract int b(View view); public abstract int c(); public abstract int c(View view); public abstract void c(int i); public abstract int d(); public abstract int d(View view); public abstract int e(); public abstract int e(View view); public abstract int f(); public abstract int h(); public abstract int h(View view); public abstract int i(); /* synthetic */ MSs(RecyclerView.tOB tob, byte b) { this(tob); } private MSs(RecyclerView.tOB tob) { this.c = PKIFailureInfo.systemUnavail; this.a = new Rect(); this.b = tob; } /* renamed from: o.MSs$4, reason: invalid class name */ /* loaded from: classes.dex */ public class AnonymousClass4 extends MSs { public AnonymousClass4(RecyclerView.tOB tob) { super(tob, (byte) 0); } @Override // o.MSs public final int d() { return this.b.w - this.b.getPaddingRight(); } @Override // o.MSs public final int c() { return this.b.w; } @Override // o.MSs public final void c(int i) { this.b.g(i); } @Override // o.MSs public final int i() { return this.b.getPaddingLeft(); } @Override // o.MSs public final int e(View view) { RecyclerView.saX sax = (RecyclerView.saX) view.getLayoutParams(); RecyclerView.tOB tob = this.b; return RecyclerView.tOB.i(view) + ((ViewGroup.MarginLayoutParams) sax).leftMargin + ((ViewGroup.MarginLayoutParams) sax).rightMargin; } @Override // o.MSs public final int b(View view) { RecyclerView.saX sax = (RecyclerView.saX) view.getLayoutParams(); RecyclerView.tOB tob = this.b; return RecyclerView.tOB.g(view) + ((ViewGroup.MarginLayoutParams) sax).topMargin + ((ViewGroup.MarginLayoutParams) sax).bottomMargin; } @Override // o.MSs public final int a(View view) { RecyclerView.saX sax = (RecyclerView.saX) view.getLayoutParams(); RecyclerView.tOB tob = this.b; return view.getRight() + RecyclerView.tOB.j(view) + ((ViewGroup.MarginLayoutParams) sax).rightMargin; } @Override // o.MSs public final int c(View view) { RecyclerView.saX sax = (RecyclerView.saX) view.getLayoutParams(); RecyclerView.tOB tob = this.b; return (view.getLeft() - RecyclerView.tOB.h(view)) - ((ViewGroup.MarginLayoutParams) sax).leftMargin; } @Override // o.MSs public final int d(View view) { this.b.Am_(view, this.a); return this.a.right; } @Override // o.MSs public final int h(View view) { this.b.Am_(view, this.a); return this.a.left; } @Override // o.MSs public final int h() { return (this.b.w - this.b.getPaddingLeft()) - this.b.getPaddingRight(); } @Override // o.MSs public final int b() { return this.b.getPaddingRight(); } @Override // o.MSs public final int e() { return this.b.x; } @Override // o.MSs public final int f() { return this.b.m; } } /* renamed from: o.MSs$3, reason: invalid class name */ /* loaded from: classes.dex */ public class AnonymousClass3 extends MSs { public AnonymousClass3(RecyclerView.tOB tob) { super(tob, (byte) 0); } @Override // o.MSs public final int d() { return this.b.l - this.b.getPaddingBottom(); } @Override // o.MSs public final int c() { return this.b.l; } @Override // o.MSs public final void c(int i) { this.b.i(i); } @Override // o.MSs public final int i() { return this.b.getPaddingTop(); } @Override // o.MSs public final int e(View view) { RecyclerView.saX sax = (RecyclerView.saX) view.getLayoutParams(); RecyclerView.tOB tob = this.b; return RecyclerView.tOB.g(view) + ((ViewGroup.MarginLayoutParams) sax).topMargin + ((ViewGroup.MarginLayoutParams) sax).bottomMargin; } @Override // o.MSs public final int b(View view) { RecyclerView.saX sax = (RecyclerView.saX) view.getLayoutParams(); RecyclerView.tOB tob = this.b; return RecyclerView.tOB.i(view) + ((ViewGroup.MarginLayoutParams) sax).leftMargin + ((ViewGroup.MarginLayoutParams) sax).rightMargin; } @Override // o.MSs public final int a(View view) { RecyclerView.saX sax = (RecyclerView.saX) view.getLayoutParams(); RecyclerView.tOB tob = this.b; return view.getBottom() + RecyclerView.tOB.b(view) + ((ViewGroup.MarginLayoutParams) sax).bottomMargin; } @Override // o.MSs public final int c(View view) { RecyclerView.saX sax = (RecyclerView.saX) view.getLayoutParams(); RecyclerView.tOB tob = this.b; return (view.getTop() - RecyclerView.tOB.m(view)) - ((ViewGroup.MarginLayoutParams) sax).topMargin; } @Override // o.MSs public final int d(View view) { this.b.Am_(view, this.a); return this.a.bottom; } @Override // o.MSs public final int h(View view) { this.b.Am_(view, this.a); return this.a.top; } @Override // o.MSs public final int h() { return (this.b.l - this.b.getPaddingTop()) - this.b.getPaddingBottom(); } @Override // o.MSs public final int b() { return this.b.getPaddingBottom(); } @Override // o.MSs public final int e() { return this.b.m; } @Override // o.MSs public final int f() { return this.b.x; } } public static MSs c(RecyclerView.tOB tob, int i) { if (i == 0) { return new AnonymousClass4(tob); } if (i != 1) { throw new IllegalArgumentException("invalid orientation"); } return new AnonymousClass3(tob); } public final RecyclerView.tOB a() { return this.b; } }