package com.a.a.a.a;

import X.M12;
import X.QJv;
import X.QKN;
import X.QKP;
import X.QKp;
import android.graphics.drawable.Drawable;
import android.view.ViewGroup;
import com.bytedance.covode.number.Covode;
import kotlin.h.b.n;

public final class a {
    public Drawable LIZ;
    public Drawable LIZIZ;
    public QKp LIZJ;
    public QKp LIZLLL;
    public float LJ;
    public boolean LJFF;
    public boolean LJI = true;
    public boolean LJII = true;
    public boolean LJIIIIZZ = true;
    public boolean LJIIIZ = true;

    static {
        Covode.recordClassIndex(1798);
    }

    public a() {
        QKp qKp = QKp.LJI;
        n.LIZ(qKp, "");
        this.LIZJ = qKp;
        QKp qKp2 = QKp.LJI;
        n.LIZ(qKp2, "");
        this.LIZLLL = qKp2;
    }

    private final QKN LIZ(QJv qJv) {
        QKP hierarchy = qJv.getHierarchy();
        n.LIZ(hierarchy, "");
        QKN qkn = hierarchy.LIZ;
        if (qkn != null) {
            return qkn;
        }
        QKN qkn2 = new QKN();
        QKP hierarchy2 = qJv.getHierarchy();
        n.LIZ(hierarchy2, "");
        hierarchy2.LIZ(qkn2);
        return qkn2;
    }

    private final QKp LIZ(String str) {
        switch (str.hashCode()) {
            case -1928367066:
                if (str.equals("fitBottomStart")) {
                    QKp qKp = QKp.LJIIIZ;
                    n.LIZ(qKp, "");
                    return qKp;
                }
                break;
            case -1364013995:
                if (str.equals("center")) {
                    QKp qKp2 = QKp.LJFF;
                    n.LIZ(qKp2, "");
                    return qKp2;
                }
                break;
            case -1274298614:
                if (str.equals("fitEnd")) {
                    QKp qKp3 = QKp.LJ;
                    n.LIZ(qKp3, "");
                    return qKp3;
                }
                break;
            case -522179887:
                if (str.equals("fitStart")) {
                    QKp qKp4 = QKp.LIZJ;
                    n.LIZ(qKp4, "");
                    return qKp4;
                }
                break;
            case -340708175:
                if (str.equals("centerInside")) {
                    QKp qKp5 = QKp.LJI;
                    n.LIZ(qKp5, "");
                    return qKp5;
                }
                break;
            case 97441490:
                if (str.equals("fitXY")) {
                    QKp qKp6 = QKp.LIZIZ;
                    n.LIZ(qKp6, "");
                    return qKp6;
                }
                break;
            case 520762310:
                if (str.equals("fitCenter")) {
                    QKp qKp7 = QKp.LIZLLL;
                    n.LIZ(qKp7, "");
                    return qKp7;
                }
                break;
            case 1161480325:
                if (str.equals("centerCrop")) {
                    QKp qKp8 = QKp.LJII;
                    n.LIZ(qKp8, "");
                    return qKp8;
                }
                break;
            case 1628133256:
                if (str.equals("focusCrop")) {
                    QKp qKp9 = QKp.LJIIIIZZ;
                    n.LIZ(qKp9, "");
                    return qKp9;
                }
                break;
        }
        throw new IllegalArgumentException("fresco unsupported scale attr ".concat(String.valueOf(str)));
    }

    public final void LIZ(QJv qJv, ViewGroup.LayoutParams layoutParams) {
        float f;
        float f2;
        float f3;
        M12.LIZ(qJv, layoutParams);
        Drawable drawable = this.LIZ;
        if (drawable != null) {
            qJv.getHierarchy().LIZ(drawable, this.LIZJ);
        }
        if (this.LIZIZ != null) {
            qJv.getHierarchy().LIZIZ(this.LIZIZ, this.LIZLLL);
        }
        if (this.LJFF) {
            float f4 = 0.0f;
            if (this.LJI) {
                f = this.LJ;
            } else {
                f = 0.0f;
            }
            if (this.LJII) {
                f2 = this.LJ;
            } else {
                f2 = 0.0f;
            }
            if (this.LJIIIIZZ) {
                f3 = this.LJ;
            } else {
                f3 = 0.0f;
            }
            if (this.LJIIIZ) {
                f4 = this.LJ;
            }
            LIZ(qJv).LIZ(f, f2, f4, f3);
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:21:0x008d, code lost:
        if (r1.equals("roundTopEnd") != false) goto L_0x014c;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:27:0x00a9, code lost:
        if (r1.equals("roundBottomEnd") != false) goto L_0x018b;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:2:0x0015, code lost:
        r1 = r8.getContext();
        r0 = getClass().getSimpleName();
        kotlin.h.b.n.LIZ(r0, "");
     */
    /* JADX WARNING: Code restructure failed: missing block: B:37:0x00e5, code lost:
        if (r1.equals("roundTopLeft") != false) goto L_0x0162;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:3:0x0028, code lost:
        return com.a.b.b.a.LIZ(r1, r0, r6);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:55:0x014a, code lost:
        if (r1.equals("roundTopRight") != false) goto L_0x014c;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:56:0x014c, code lost:
        r5.LJFF = true;
        r0 = r7.LIZ;
        kotlin.h.b.n.LIZ(r0, "");
        r5.LJII = java.lang.Boolean.parseBoolean(r0);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:57:0x0159, code lost:
        return true;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:59:0x0160, code lost:
        if (r1.equals("roundTopStart") != false) goto L_0x0162;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:60:0x0162, code lost:
        r5.LJFF = true;
        r0 = r7.LIZ;
        kotlin.h.b.n.LIZ(r0, "");
        r5.LJI = java.lang.Boolean.parseBoolean(r0);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:61:0x016f, code lost:
        return true;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:67:0x0189, code lost:
        if (r1.equals("roundBottomRight") != false) goto L_0x018b;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:68:0x018b, code lost:
        r5.LJFF = true;
        r0 = r7.LIZ;
        kotlin.h.b.n.LIZ(r0, "");
        r5.LJIIIZ = java.lang.Boolean.parseBoolean(r0);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:69:0x0198, code lost:
        return true;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:71:0x019f, code lost:
        if (r1.equals("roundBottomStart") != false) goto L_0x01ed;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:85:0x01eb, code lost:
        if (r1.equals("roundBottomLeft") != false) goto L_0x01ed;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:86:0x01ed, code lost:
        r5.LJFF = true;
        r0 = r7.LIZ;
        kotlin.h.b.n.LIZ(r0, "");
        r5.LJIIIIZZ = java.lang.Boolean.parseBoolean(r0);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:87:0x01fa, code lost:
        return true;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final boolean LIZ(java.lang.String r6, com.a.b.a.a r7, X.QJv r8, android.view.ViewGroup.LayoutParams r9) {
        /*
            r5 = this;
            X.M12.LIZ(r6, r7, r8, r9)
            android.content.Context r4 = r8.getContext()
            java.lang.String r1 = com.a.b.b.a.LIZ((java.lang.String) r6)
            int r0 = r1.hashCode()
            java.lang.String r3 = ""
            r2 = 1
            switch(r0) {
                case -2024905967: goto L_0x0029;
                case -1571314776: goto L_0x0040;
                case -828257865: goto L_0x0052;
                case -574205305: goto L_0x0070;
                case -548532620: goto L_0x0087;
                case -210833935: goto L_0x0091;
                case -208400190: goto L_0x00a3;
                case -197243856: goto L_0x00ad;
                case 112371891: goto L_0x00cb;
                case 175558030: goto L_0x00df;
                case 265397995: goto L_0x00e8;
                case 387575632: goto L_0x0101;
                case 694764180: goto L_0x0115;
                case 709193948: goto L_0x0130;
                case 1152992629: goto L_0x0144;
                case 1154238395: goto L_0x015a;
                case 1493910427: goto L_0x0170;
                case 1602743363: goto L_0x0183;
                case 1603989129: goto L_0x0199;
                case 1625491118: goto L_0x01a2;
                case 2086868579: goto L_0x01b7;
                case 2105152710: goto L_0x01ce;
                case 2129728768: goto L_0x01e5;
                default: goto L_0x0015;
            }
        L_0x0015:
            android.content.Context r1 = r8.getContext()
            java.lang.Class r0 = r5.getClass()
            java.lang.String r0 = r0.getSimpleName()
            kotlin.h.b.n.LIZ(r0, r3)
            boolean r0 = com.a.b.b.a.LIZ(r1, r0, r6)
            return r0
        L_0x0029:
            java.lang.String r0 = "roundingBorderPadding"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            X.QKN r1 = r5.LIZ((X.QJv) r8)
            kotlin.h.b.n.LIZ(r4, r3)
            float r0 = com.a.b.b.a.LIZ(r4, r7)
            r1.LIZLLL(r0)
            return r2
        L_0x0040:
            java.lang.String r0 = "placeholderImage"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            kotlin.h.b.n.LIZ(r4, r3)
            android.graphics.drawable.Drawable r0 = com.a.b.b.a.LIZJ(r4, r7)
            r5.LIZ = r0
            return r2
        L_0x0052:
            java.lang.String r0 = "actualImageScaleType"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            X.QI2 r1 = r8.getHierarchy()
            X.QKP r1 = (X.QKP) r1
            kotlin.h.b.n.LIZ(r1, r3)
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            X.QKp r0 = r5.LIZ((java.lang.String) r0)
            r1.LIZ(r0)
            return r2
        L_0x0070:
            java.lang.String r0 = "roundWithOverlayColor"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            X.QKN r1 = r5.LIZ((X.QJv) r8)
            kotlin.h.b.n.LIZ(r4, r3)
            int r0 = com.a.b.b.a.LIZLLL(r4, r7)
            r1.LIZ(r0)
            return r2
        L_0x0087:
            java.lang.String r0 = "roundTopEnd"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            goto L_0x014c
        L_0x0091:
            java.lang.String r0 = "failureImage"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            kotlin.h.b.n.LIZ(r4, r3)
            android.graphics.drawable.Drawable r0 = com.a.b.b.a.LIZJ(r4, r7)
            r5.LIZIZ = r0
            return r2
        L_0x00a3:
            java.lang.String r0 = "roundBottomEnd"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            goto L_0x018b
        L_0x00ad:
            java.lang.String r0 = "fadeDuration"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            X.QI2 r1 = r8.getHierarchy()
            X.QKP r1 = (X.QKP) r1
            kotlin.h.b.n.LIZ(r1, r3)
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            int r0 = java.lang.Integer.parseInt(r0)
            r1.LIZIZ(r0)
            return r2
        L_0x00cb:
            java.lang.String r0 = "failureImageScaleType"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            X.QKp r0 = r5.LIZ((java.lang.String) r0)
            r5.LIZLLL = r0
            return r2
        L_0x00df:
            java.lang.String r0 = "roundTopLeft"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            goto L_0x0162
        L_0x00e8:
            java.lang.String r0 = "overlayImage"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            X.QI2 r1 = r8.getHierarchy()
            X.QKP r1 = (X.QKP) r1
            kotlin.h.b.n.LIZ(r4, r3)
            android.graphics.drawable.Drawable r0 = com.a.b.b.a.LIZJ(r4, r7)
            r1.LIZLLL(r0)
            return r2
        L_0x0101:
            java.lang.String r0 = "roundAsCircle"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            X.QKN r1 = r5.LIZ((X.QJv) r8)
            boolean r0 = com.a.b.b.a.LIZ((com.a.b.a.a) r7)
            r1.LIZ(r0)
            return r2
        L_0x0115:
            java.lang.String r0 = "roundedCornerRadius"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            kotlin.h.b.n.LIZ(r4, r3)
            float r0 = com.a.b.b.a.LIZ(r4, r7)
            r5.LJ = r0
            X.QKN r1 = r5.LIZ((X.QJv) r8)
            float r0 = r5.LJ
            r1.LIZ(r0)
            return r2
        L_0x0130:
            java.lang.String r0 = "placeholderImageScaleType"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            X.QKp r0 = r5.LIZ((java.lang.String) r0)
            r5.LIZJ = r0
            return r2
        L_0x0144:
            java.lang.String r0 = "roundTopRight"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
        L_0x014c:
            r5.LJFF = r2
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            boolean r0 = java.lang.Boolean.parseBoolean(r0)
            r5.LJII = r0
            return r2
        L_0x015a:
            java.lang.String r0 = "roundTopStart"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
        L_0x0162:
            r5.LJFF = r2
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            boolean r0 = java.lang.Boolean.parseBoolean(r0)
            r5.LJI = r0
            return r2
        L_0x0170:
            java.lang.String r0 = "actualImageResource"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            kotlin.h.b.n.LIZ(r4, r3)
            int r0 = com.a.b.b.a.LIZIZ(r4, r7)
            r8.setActualImageResource(r0)
            return r2
        L_0x0183:
            java.lang.String r0 = "roundBottomRight"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
        L_0x018b:
            r5.LJFF = r2
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            boolean r0 = java.lang.Boolean.parseBoolean(r0)
            r5.LJIIIZ = r0
            return r2
        L_0x0199:
            java.lang.String r0 = "roundBottomStart"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            goto L_0x01ed
        L_0x01a2:
            java.lang.String r0 = "viewAspectRatio"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            float r0 = java.lang.Float.parseFloat(r0)
            r8.setAspectRatio(r0)
            return r2
        L_0x01b7:
            java.lang.String r0 = "roundingBorderColor"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            X.QKN r1 = r5.LIZ((X.QJv) r8)
            kotlin.h.b.n.LIZ(r4, r3)
            int r0 = com.a.b.b.a.LIZLLL(r4, r7)
            r1.LIZIZ(r0)
            return r2
        L_0x01ce:
            java.lang.String r0 = "roundingBorderWidth"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
            X.QKN r1 = r5.LIZ((X.QJv) r8)
            kotlin.h.b.n.LIZ(r4, r3)
            float r0 = com.a.b.b.a.LIZ(r4, r7)
            r1.LIZJ(r0)
            return r2
        L_0x01e5:
            java.lang.String r0 = "roundBottomLeft"
            boolean r0 = r1.equals(r0)
            if (r0 == 0) goto L_0x0015
        L_0x01ed:
            r5.LJFF = r2
            java.lang.String r0 = r7.LIZ
            kotlin.h.b.n.LIZ(r0, r3)
            boolean r0 = java.lang.Boolean.parseBoolean(r0)
            r5.LJIIIIZZ = r0
            return r2
        */
        throw new UnsupportedOperationException("Method not decompiled: com.a.a.a.a.a.LIZ(java.lang.String, com.a.b.a.a, X.QJv, android.view.ViewGroup$LayoutParams):boolean");
    }
}
