package com.bytedance.ies.xelement.text.inlinetext;

import X.C3933Qf4;
import X.C3948QfJ;
import X.C3949QfK;
import X.C3986Qfv;
import X.C4398QmZ;
import X.M12;
import X.Q39;
import X.QNL;
import android.text.SpannableStringBuilder;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.xelement.text.text.LynxTextShadowNode;
import com.lynx.tasm.behavior.shadow.text.InlineTextShadowNode;
import com.lynx.tasm.behavior.shadow.text.RawTextShadowNode;
import kotlin.h.b.n;

public final class LynxInlineTextShadowNode extends InlineTextShadowNode {
    public static final C3949QfK LIZIZ = new C3949QfK((byte) 0);
    public String LIZ = "none";
    public boolean LIZJ;

    static {
        Covode.recordClassIndex(32597);
    }

    @QNL(LIZ = "no-trim", LJFF = true)
    public final void setNoTrim(boolean z) {
        this.LIZJ = z;
        LJFF();
    }

    public final void LIZ(SpannableStringBuilder spannableStringBuilder, RawTextShadowNode rawTextShadowNode) {
        int i;
        M12.LIZ(spannableStringBuilder, rawTextShadowNode);
        String str = rawTextShadowNode.LIZ;
        if (!this.LIZJ) {
            str = LynxTextShadowNode.LIZJ.LIZ(str);
        }
        if (n.LIZ(this.LIZ, "bracket")) {
            C3986Qfv qfv = C3986Qfv.LIZJ;
            C4398QmZ LJIIJ = LJIIJ();
            C3933Qf4 qf4 = this.LJIILJJIL;
            n.LIZ(qf4, Q39.LIZJ);
            if (C3948QfJ.LIZ(qf4.LJIIJ)) {
                i = 40;
            } else {
                C3933Qf4 qf42 = this.LJIILJJIL;
                n.LIZ(qf42, Q39.LIZJ);
                i = (int) qf42.LJIIJ;
            }
            spannableStringBuilder.append(qfv.LIZ(LJIIJ, str, i));
            return;
        }
        spannableStringBuilder.append(str);
    }
}
