package StructuralClass;

import org.apache.http.util.TextUtils;

import TX_OtherClass.JceStruct;
import TX_OtherClass.c;
import TX_OtherClass.d;

public final class MarkLabel extends JceStruct {
    public String bgColor;
    public String markImageUrl;
    public CharSequence minorHtmlText;
    public String minorText;
    public byte optType;
    public byte position;
    public CharSequence primeHtmlText;
    public String primeText;
    private static boolean sCanParse;
    public CharSequence thirdHtmlText;
    public String thirdText;
    public byte type;
    public int uiType;

    static {
        MarkLabel.sCanParse = true;
    }

    public MarkLabel() {
        super();
        this.type = 0;
        this.position = 0;
        this.bgColor = "";
        this.primeText = "";
        this.minorText = "";
        this.markImageUrl = "";
        this.optType = 0;
        this.uiType = 0;
        this.thirdText = "";
    }

    public MarkLabel(byte arg3, byte arg4, String arg5, String arg6, String arg7, String arg8, byte arg9, int arg10, String arg11) {
        super();
        this.type = 0;
        this.position = 0;
        this.bgColor = "";
        this.primeText = "";
        this.minorText = "";
        this.markImageUrl = "";
        this.optType = 0;
        this.uiType = 0;
        this.thirdText = "";
        this.type = arg3;
        this.position = arg4;
        this.bgColor = arg5;
        this.primeText = arg6;
        this.minorText = arg7;
        this.markImageUrl = arg8;
        this.optType = arg9;
        this.uiType = arg10;
        this.thirdText = arg11;
        this.transformHtmlText();
    }

    private static boolean isHtmlText(String arg1) {
        boolean v0 = (TextUtils.isEmpty(((CharSequence)arg1))) || !arg1.contains("<") ? false : true;
        return v0;
    }

    public final void readFrom(c arg4) {
        this.type = arg4.a(this.type, 0, true);
        this.position = arg4.a(this.position, 1, true);
        this.bgColor = arg4.b(2, false);
        this.primeText = arg4.b(3, false);
        this.minorText = arg4.b(4, false);
        this.markImageUrl = arg4.b(5, false);
        this.optType = arg4.a(this.optType, 6, false);
        this.uiType = arg4.a(this.uiType, 7, false);
        this.thirdText = arg4.b(8, false);
        this.transformHtmlText();
    }

    public final String toString() {
        return "type = " + this.type + ", position = " + this.position + ", bgColor = " + this.bgColor + ", prime = " + this.primeText + ", minor = " + this.minorText + ", third = " + this.thirdText + ", imageUrl = " + this.markImageUrl + ", code = " + this.hashCode();
    }

    public final void transformHtmlText() {
        if(MarkLabel.sCanParse) {
            this.primeHtmlText = MarkLabel.tryTransformToHtml(this.primeText);
            this.minorHtmlText = MarkLabel.tryTransformToHtml(this.minorText);
            this.thirdHtmlText = MarkLabel.tryTransformToHtml(this.thirdText);
        }
        else {
            this.primeHtmlText = this.primeText;
            this.minorHtmlText = this.minorText;
            this.thirdHtmlText = this.thirdText;
        }
    }

    private static CharSequence tryTransformToHtml(String arg1) {

    	return null;
    }

    public final void writeTo(d arg3) {
        arg3.a(this.type, 0);
        arg3.a(this.position, 1);
        if(this.bgColor != null) {
            arg3.a(this.bgColor, 2);
        }

        if(this.primeText != null) {
            arg3.a(this.primeText, 3);
        }

        if(this.minorText != null) {
            arg3.a(this.minorText, 4);
        }

        if(this.markImageUrl != null) {
            arg3.a(this.markImageUrl, 5);
        }

        arg3.a(this.optType, 6);
        arg3.a(this.uiType, 7);
        if(this.thirdText != null) {
            arg3.a(this.thirdText, 8);
        }
    }

}

