package r2;

import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.google.common.base.h;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f32331a;

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f32334d;

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

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

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final int f32337g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final int f32338h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final int f32339i;

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

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final int f32341k;

    public c(int i10, int i11, int i12, int i13, int i14, int i15, int i16, int i17, int i18, int i19, int i20) {
        this.f32331a = i10;
        this.f32332b = i11;
        this.f32333c = i12;
        this.f32334d = i13;
        this.f32335e = i14;
        this.f32336f = i15;
        this.f32337g = i16;
        this.f32338h = i17;
        this.f32339i = i18;
        this.f32340j = i19;
        this.f32341k = i20;
    }

    @Nullable
    public static c fromFormatLine(String str) {
        String[] strArrSplit = TextUtils.split(str.substring(7), ",");
        int i10 = -1;
        int i11 = -1;
        int i12 = -1;
        int i13 = -1;
        int i14 = -1;
        int i15 = -1;
        int i16 = -1;
        int i17 = -1;
        int i18 = -1;
        int i19 = -1;
        for (int i20 = 0; i20 < strArrSplit.length; i20++) {
            String strQ = h.q(strArrSplit[i20].trim());
            strQ.getClass();
            switch (strQ) {
                case "italic":
                    i16 = i20;
                    break;
                case "underline":
                    i17 = i20;
                    break;
                case "strikeout":
                    i18 = i20;
                    break;
                case "primarycolour":
                    i12 = i20;
                    break;
                case "bold":
                    i15 = i20;
                    break;
                case "name":
                    i10 = i20;
                    break;
                case "fontsize":
                    i14 = i20;
                    break;
                case "borderstyle":
                    i19 = i20;
                    break;
                case "alignment":
                    i11 = i20;
                    break;
                case "outlinecolour":
                    i13 = i20;
                    break;
            }
        }
        if (i10 != -1) {
            return new c(i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, strArrSplit.length);
        }
        return null;
    }
}
