package com.bytedance.sdk.component.YFl;

import android.text.TextUtils;
import com.amazon.a.a.o.b.f;
/* loaded from: classes2.dex */
class bZ {
    private static boolean YFl;

    /* JADX INFO: Access modifiers changed from: package-private */
    public static String YFl() {
        return "";
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static void YFl(boolean z) {
        YFl = z;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static String YFl(Throwable th) {
        return "{\"code\":" + (th instanceof Wwa ? ((Wwa) th).YFl : 0) + "}";
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static String YFl(String str) {
        if (TextUtils.isEmpty(str)) {
            return "{\"code\":1}";
        }
        String substring = YFl ? str.substring(1, str.length() - 1) : "";
        String concat = "{\"code\":1,\"__data\":".concat(String.valueOf(str));
        if (!substring.isEmpty()) {
            return concat + f.f114a + substring + "}";
        }
        return concat + "}";
    }
}
