package z;

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 d5.AbstractC0844a;
import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Map;
import y.AbstractC1736a;

/* JADX INFO: renamed from: z.d, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1772d extends ViewGroup.MarginLayoutParams {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    public C1772d() {
        super(-2, -2);
        this.f19085b = false;
        this.f19086c = 0;
        this.f19087d = 0;
        this.f19088e = -1;
        this.f19089f = -1;
        this.f19090g = 0;
        this.f19091h = 0;
        this.f19097o = new Rect();
    }

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

    public C1772d(Context context, AttributeSet attributeSet) {
        AbstractC1769a abstractC1769a;
        super(context, attributeSet);
        this.f19085b = false;
        this.f19086c = 0;
        this.f19087d = 0;
        this.f19088e = -1;
        this.f19089f = -1;
        this.f19090g = 0;
        this.f19091h = 0;
        this.f19097o = new Rect();
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC1736a.f18807b);
        this.f19086c = typedArrayObtainStyledAttributes.getInteger(0, 0);
        this.f19089f = typedArrayObtainStyledAttributes.getResourceId(1, -1);
        this.f19087d = typedArrayObtainStyledAttributes.getInteger(2, 0);
        this.f19088e = typedArrayObtainStyledAttributes.getInteger(6, -1);
        this.f19090g = typedArrayObtainStyledAttributes.getInt(5, 0);
        this.f19091h = typedArrayObtainStyledAttributes.getInt(4, 0);
        boolean zHasValue = typedArrayObtainStyledAttributes.hasValue(3);
        this.f19085b = zHasValue;
        if (zHasValue) {
            String string = typedArrayObtainStyledAttributes.getString(3);
            String str = CoordinatorLayout.f7914J;
            if (TextUtils.isEmpty(string)) {
                abstractC1769a = null;
            } else {
                if (string.startsWith(".")) {
                    string = context.getPackageName() + string;
                } else if (string.indexOf(46) < 0) {
                    String str2 = CoordinatorLayout.f7914J;
                    if (!TextUtils.isEmpty(str2)) {
                        string = str2 + '.' + string;
                    }
                }
                try {
                    ThreadLocal threadLocal = CoordinatorLayout.f7916L;
                    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.f7915K);
                        constructor.setAccessible(true);
                        map.put(string, constructor);
                    }
                    abstractC1769a = (AbstractC1769a) constructor.newInstance(context, attributeSet);
                } catch (Exception e8) {
                    throw new RuntimeException(AbstractC0844a.x("Could not inflate Behavior subclass ", string), e8);
                }
            }
            this.f19084a = abstractC1769a;
        }
        typedArrayObtainStyledAttributes.recycle();
        AbstractC1769a abstractC1769a2 = this.f19084a;
        if (abstractC1769a2 != null) {
            abstractC1769a2.c(this);
        }
    }

    public C1772d(C1772d c1772d) {
        super((ViewGroup.MarginLayoutParams) c1772d);
        this.f19085b = false;
        this.f19086c = 0;
        this.f19087d = 0;
        this.f19088e = -1;
        this.f19089f = -1;
        this.f19090g = 0;
        this.f19091h = 0;
        this.f19097o = new Rect();
    }

    public C1772d(ViewGroup.MarginLayoutParams marginLayoutParams) {
        super(marginLayoutParams);
        this.f19085b = false;
        this.f19086c = 0;
        this.f19087d = 0;
        this.f19088e = -1;
        this.f19089f = -1;
        this.f19090g = 0;
        this.f19091h = 0;
        this.f19097o = new Rect();
    }

    public C1772d(ViewGroup.LayoutParams layoutParams) {
        super(layoutParams);
        this.f19085b = false;
        this.f19086c = 0;
        this.f19087d = 0;
        this.f19088e = -1;
        this.f19089f = -1;
        this.f19090g = 0;
        this.f19091h = 0;
        this.f19097o = new Rect();
    }
}
