package androidx.recyclerview.widget;

import android.view.View;
import android.view.ViewGroup;

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

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Object f12837b;

    public /* synthetic */ H(Object obj, int i6) {
        this.f12836a = i6;
        this.f12837b = obj;
    }

    public int a(View view) {
        switch (this.f12836a) {
            case 0:
                return ((J) this.f12837b).E(view) + ((ViewGroup.MarginLayoutParams) ((K) view.getLayoutParams())).rightMargin;
            default:
                return ((J) this.f12837b).z(view) + ((ViewGroup.MarginLayoutParams) ((K) view.getLayoutParams())).bottomMargin;
        }
    }

    public int b(View view) {
        switch (this.f12836a) {
            case 0:
                return ((J) this.f12837b).B(view) - ((ViewGroup.MarginLayoutParams) ((K) view.getLayoutParams())).leftMargin;
            default:
                return ((J) this.f12837b).F(view) - ((ViewGroup.MarginLayoutParams) ((K) view.getLayoutParams())).topMargin;
        }
    }

    public int c() {
        switch (this.f12836a) {
            case 0:
                J j4 = (J) this.f12837b;
                return j4.f12854n - j4.J();
            default:
                J j6 = (J) this.f12837b;
                return j6.f12855o - j6.H();
        }
    }

    public int d() {
        switch (this.f12836a) {
            case 0:
                return ((J) this.f12837b).I();
            default:
                return ((J) this.f12837b).K();
        }
    }
}
