package androidx.recyclerview.widget;

import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;

/* JADX INFO: renamed from: androidx.recyclerview.widget.w, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1172w extends T1.f {

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C1172w(J j4, int i6) {
        super(j4);
        this.f13191d = i6;
    }

    @Override // T1.f
    public final int b(View view) {
        switch (this.f13191d) {
            case 0:
                return ((J) this.f6581b).E(view) + ((ViewGroup.MarginLayoutParams) ((K) view.getLayoutParams())).rightMargin;
            default:
                return ((J) this.f6581b).z(view) + ((ViewGroup.MarginLayoutParams) ((K) view.getLayoutParams())).bottomMargin;
        }
    }

    @Override // T1.f
    public final int c(View view) {
        switch (this.f13191d) {
            case 0:
                K k6 = (K) view.getLayoutParams();
                ((J) this.f6581b).getClass();
                return J.D(view) + ((ViewGroup.MarginLayoutParams) k6).leftMargin + ((ViewGroup.MarginLayoutParams) k6).rightMargin;
            default:
                K k7 = (K) view.getLayoutParams();
                ((J) this.f6581b).getClass();
                return J.C(view) + ((ViewGroup.MarginLayoutParams) k7).topMargin + ((ViewGroup.MarginLayoutParams) k7).bottomMargin;
        }
    }

    @Override // T1.f
    public final int d(View view) {
        switch (this.f13191d) {
            case 0:
                K k6 = (K) view.getLayoutParams();
                ((J) this.f6581b).getClass();
                return J.C(view) + ((ViewGroup.MarginLayoutParams) k6).topMargin + ((ViewGroup.MarginLayoutParams) k6).bottomMargin;
            default:
                K k7 = (K) view.getLayoutParams();
                ((J) this.f6581b).getClass();
                return J.D(view) + ((ViewGroup.MarginLayoutParams) k7).leftMargin + ((ViewGroup.MarginLayoutParams) k7).rightMargin;
        }
    }

    @Override // T1.f
    public final int e(View view) {
        switch (this.f13191d) {
            case 0:
                return ((J) this.f6581b).B(view) - ((ViewGroup.MarginLayoutParams) ((K) view.getLayoutParams())).leftMargin;
            default:
                return ((J) this.f6581b).F(view) - ((ViewGroup.MarginLayoutParams) ((K) view.getLayoutParams())).topMargin;
        }
    }

    @Override // T1.f
    public final int f() {
        switch (this.f13191d) {
            case 0:
                return ((J) this.f6581b).f12854n;
            default:
                return ((J) this.f6581b).f12855o;
        }
    }

    @Override // T1.f
    public final int g() {
        switch (this.f13191d) {
            case 0:
                J j4 = (J) this.f6581b;
                return j4.f12854n - j4.J();
            default:
                J j6 = (J) this.f6581b;
                return j6.f12855o - j6.H();
        }
    }

    @Override // T1.f
    public final int h() {
        switch (this.f13191d) {
            case 0:
                return ((J) this.f6581b).J();
            default:
                return ((J) this.f6581b).H();
        }
    }

    @Override // T1.f
    public final int i() {
        switch (this.f13191d) {
            case 0:
                return ((J) this.f6581b).l;
            default:
                return ((J) this.f6581b).f12853m;
        }
    }

    @Override // T1.f
    public final int j() {
        switch (this.f13191d) {
            case 0:
                return ((J) this.f6581b).f12853m;
            default:
                return ((J) this.f6581b).l;
        }
    }

    @Override // T1.f
    public final int k() {
        switch (this.f13191d) {
            case 0:
                return ((J) this.f6581b).I();
            default:
                return ((J) this.f6581b).K();
        }
    }

    @Override // T1.f
    public final int l() {
        switch (this.f13191d) {
            case 0:
                J j4 = (J) this.f6581b;
                return (j4.f12854n - j4.I()) - j4.J();
            default:
                J j6 = (J) this.f6581b;
                return (j6.f12855o - j6.K()) - j6.H();
        }
    }

    @Override // T1.f
    public final int m(View view) {
        switch (this.f13191d) {
            case 0:
                J j4 = (J) this.f6581b;
                Rect rect = (Rect) this.f6582c;
                j4.O(view, rect);
                return rect.right;
            default:
                J j6 = (J) this.f6581b;
                Rect rect2 = (Rect) this.f6582c;
                j6.O(view, rect2);
                return rect2.bottom;
        }
    }

    @Override // T1.f
    public final int n(View view) {
        switch (this.f13191d) {
            case 0:
                J j4 = (J) this.f6581b;
                Rect rect = (Rect) this.f6582c;
                j4.O(view, rect);
                return rect.left;
            default:
                J j6 = (J) this.f6581b;
                Rect rect2 = (Rect) this.f6582c;
                j6.O(view, rect2);
                return rect2.top;
        }
    }

    @Override // T1.f
    public final void o(int i6) {
        switch (this.f13191d) {
            case 0:
                ((J) this.f6581b).T(i6);
                break;
            default:
                ((J) this.f6581b).U(i6);
                break;
        }
    }
}
