/*
 * Decompiled with CFR 0.152.
 */
public final class fe
extends gm {
    private lc b;
    private w c;
    private char d;
    private char e;
    private String f;
    private boolean g;
    private int h;
    public boolean a;

    public fe(int n, int n2, int n3, int n4, String string) {
        super(n, n2, n3, n4);
        this.f = string;
        this.c = lh.k().h().a(1, true, false, -11842741, false);
        this.a = true;
        this.h = 1;
    }

    public fe(int n, int n2, char c, char c2) {
        super(n, n2, ps.a().i(), ps.a().h());
        this.g = false;
        this.d = c;
        this.e = c2;
        this.b = ps.a().l;
        this.a = true;
        this.h = 0;
    }

    public final void a() {
        this.g = false;
    }

    public final int a(nj nj2) {
        if (!nj2.b() && !nj2.f()) {
            this.g = true;
        }
        if (!nj2.a() && nj2.j() && this.a) {
            return 3;
        }
        return -2;
    }

    public final int a(nj nj2, int n, int n2) {
        this.g = false;
        return super.a(nj2, n, n2);
    }

    public final void b(ht ht2, int n, int n2) {
        switch (this.h) {
            case 0: {
                int n3;
                ps ps2 = ps.a();
                if (this.g && this.a) {
                    n3 = n - (this.b.c('\ued3d') - ps2.i()) / 2;
                    int n4 = n2 - (this.b.b('\ued3d') - ps2.h()) / 2;
                    this.b.a('\ued3d', ht2, n3, n4);
                }
                lc lc2 = this.b;
                n3 = this.a ? this.d : this.e;
                lc2.a((char)n3, ht2, n + ps2.j(), n2 + ps.k());
                return;
            }
            case 1: {
                if (!this.g) {
                    a.a(ht2, 16382715, 13160156, n, n2, this.r, this.s);
                    ht2.a(-11842741);
                } else {
                    a.a(ht2, 8104929, 155334, n, n2, this.r, this.s);
                    ht2.a(-1);
                }
                ht2.d(n, n2, this.r, this.s);
                bk.a(ht2, this.c, this.f, n += (this.r - this.c.a(this.f)) / 2, n2 += (this.s - this.c.l()) / 2, new int[2], ps.a().k);
            }
        }
    }
}

