package B;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Map;

/* JADX INFO: loaded from: classes.dex */
public final class e extends ViewGroup.MarginLayoutParams {

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

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

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final int f101e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final int f102f;

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

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public int f104h;
    public int i;

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

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public View f106k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public View f107l;

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

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

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final Rect f110o;

    public e() {
        super(-2, -2);
        this.f98b = false;
        this.f99c = 0;
        this.f100d = 0;
        this.f101e = -1;
        this.f102f = -1;
        this.f103g = 0;
        this.f104h = 0;
        this.f110o = new Rect();
    }

    public final boolean a(int i) {
        if (i == 0) {
            return this.f108m;
        }
        if (i != 1) {
            return false;
        }
        return this.f109n;
    }

    public e(Context context, AttributeSet attributeSet) {
        b bVar;
        super(context, attributeSet);
        this.f98b = false;
        this.f99c = 0;
        this.f100d = 0;
        this.f101e = -1;
        this.f102f = -1;
        this.f103g = 0;
        this.f104h = 0;
        this.f110o = new Rect();
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, A.a.f1b);
        this.f99c = typedArrayObtainStyledAttributes.getInteger(0, 0);
        this.f102f = typedArrayObtainStyledAttributes.getResourceId(1, -1);
        this.f100d = typedArrayObtainStyledAttributes.getInteger(2, 0);
        this.f101e = typedArrayObtainStyledAttributes.getInteger(6, -1);
        this.f103g = typedArrayObtainStyledAttributes.getInt(5, 0);
        this.f104h = typedArrayObtainStyledAttributes.getInt(4, 0);
        boolean zHasValue = typedArrayObtainStyledAttributes.hasValue(3);
        this.f98b = zHasValue;
        if (zHasValue) {
            String string = typedArrayObtainStyledAttributes.getString(3);
            String str = CoordinatorLayout.f3900D;
            if (TextUtils.isEmpty(string)) {
                bVar = null;
            } else {
                if (string.startsWith(".")) {
                    string = context.getPackageName() + string;
                } else if (string.indexOf(46) < 0) {
                    String str2 = CoordinatorLayout.f3900D;
                    if (!TextUtils.isEmpty(str2)) {
                        string = str2 + '.' + string;
                    }
                }
                try {
                    ThreadLocal threadLocal = CoordinatorLayout.f3902F;
                    Map map = (Map) threadLocal.get();
                    if (map == null) {
                        map = new HashMap();
                        threadLocal.set(map);
                    }
                    Constructor<?> constructor = (Constructor) map.get(string);
                    if (constructor == null) {
                        constructor = Class.forName(string, false, context.getClassLoader()).getConstructor(CoordinatorLayout.f3901E);
                        constructor.setAccessible(true);
                        map.put(string, constructor);
                    }
                    bVar = (b) constructor.newInstance(context, attributeSet);
                } catch (Exception e2) {
                    throw new RuntimeException(s0.c.f("Could not inflate Behavior subclass ", string), e2);
                }
            }
            this.f97a = bVar;
        }
        typedArrayObtainStyledAttributes.recycle();
        b bVar2 = this.f97a;
        if (bVar2 != null) {
            bVar2.c(this);
        }
    }

    public e(e eVar) {
        super((ViewGroup.MarginLayoutParams) eVar);
        this.f98b = false;
        this.f99c = 0;
        this.f100d = 0;
        this.f101e = -1;
        this.f102f = -1;
        this.f103g = 0;
        this.f104h = 0;
        this.f110o = new Rect();
    }

    public e(ViewGroup.MarginLayoutParams marginLayoutParams) {
        super(marginLayoutParams);
        this.f98b = false;
        this.f99c = 0;
        this.f100d = 0;
        this.f101e = -1;
        this.f102f = -1;
        this.f103g = 0;
        this.f104h = 0;
        this.f110o = new Rect();
    }

    public e(ViewGroup.LayoutParams layoutParams) {
        super(layoutParams);
        this.f98b = false;
        this.f99c = 0;
        this.f100d = 0;
        this.f101e = -1;
        this.f102f = -1;
        this.f103g = 0;
        this.f104h = 0;
        this.f110o = new Rect();
    }
}
