package androidx.constraintlayout.widget;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.SparseIntArray;

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

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public static final SparseIntArray f1438n;

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

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public String f1442d;

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

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

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public float f1445g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public float f1446h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public float f1447i;

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

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

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

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

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        f1438n = sparseIntArray;
        sparseIntArray.append(s.Motion_motionPathRotate, 1);
        sparseIntArray.append(s.Motion_pathMotionArc, 2);
        sparseIntArray.append(s.Motion_transitionEasing, 3);
        sparseIntArray.append(s.Motion_drawPath, 4);
        sparseIntArray.append(s.Motion_animateRelativeTo, 5);
        sparseIntArray.append(s.Motion_animateCircleAngleTo, 6);
        sparseIntArray.append(s.Motion_motionStagger, 7);
        sparseIntArray.append(s.Motion_quantizeMotionSteps, 8);
        sparseIntArray.append(s.Motion_quantizeMotionPhase, 9);
        sparseIntArray.append(s.Motion_quantizeMotionInterpolator, 10);
    }

    public final void a(l lVar) {
        this.f1439a = lVar.f1439a;
        this.f1440b = lVar.f1440b;
        this.f1442d = lVar.f1442d;
        this.f1443e = lVar.f1443e;
        this.f1444f = lVar.f1444f;
        this.f1446h = lVar.f1446h;
        this.f1445g = lVar.f1445g;
    }

    public final void b(Context context, AttributeSet attributeSet) {
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, s.Motion);
        this.f1439a = true;
        int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
        for (int i10 = 0; i10 < indexCount; i10++) {
            int index = typedArrayObtainStyledAttributes.getIndex(i10);
            switch (f1438n.get(index)) {
                case 1:
                    this.f1446h = typedArrayObtainStyledAttributes.getFloat(index, this.f1446h);
                    break;
                case 2:
                    this.f1443e = typedArrayObtainStyledAttributes.getInt(index, this.f1443e);
                    break;
                case 3:
                    if (typedArrayObtainStyledAttributes.peekValue(index).type == 3) {
                        this.f1442d = typedArrayObtainStyledAttributes.getString(index);
                    } else {
                        this.f1442d = v.f.f33567c[typedArrayObtainStyledAttributes.getInteger(index, 0)];
                    }
                    break;
                case 4:
                    this.f1444f = typedArrayObtainStyledAttributes.getInt(index, 0);
                    break;
                case 5:
                    this.f1440b = o.l(typedArrayObtainStyledAttributes, index, this.f1440b);
                    break;
                case 6:
                    this.f1441c = typedArrayObtainStyledAttributes.getInteger(index, this.f1441c);
                    break;
                case 7:
                    this.f1445g = typedArrayObtainStyledAttributes.getFloat(index, this.f1445g);
                    break;
                case 8:
                    this.f1448j = typedArrayObtainStyledAttributes.getInteger(index, this.f1448j);
                    break;
                case 9:
                    this.f1447i = typedArrayObtainStyledAttributes.getFloat(index, this.f1447i);
                    break;
                case 10:
                    int i11 = typedArrayObtainStyledAttributes.peekValue(index).type;
                    if (i11 == 1) {
                        int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, -1);
                        this.f1451m = resourceId;
                        if (resourceId != -1) {
                            this.f1450l = -2;
                        }
                    } else if (i11 == 3) {
                        String string = typedArrayObtainStyledAttributes.getString(index);
                        this.f1449k = string;
                        if (string.indexOf("/") > 0) {
                            this.f1451m = typedArrayObtainStyledAttributes.getResourceId(index, -1);
                            this.f1450l = -2;
                        } else {
                            this.f1450l = -1;
                        }
                    } else {
                        this.f1450l = typedArrayObtainStyledAttributes.getInteger(index, this.f1451m);
                    }
                    break;
            }
        }
        typedArrayObtainStyledAttributes.recycle();
    }
}
