/*
 * Decompiled with CFR 0.152.
 */
public final class pt
extends gm {
    private final w c;
    private final int e;
    private final String f;
    public final String a;
    public final String b;
    private ij d;

    public final boolean b() {
        return true;
    }

    private boolean d() {
        return this.t_() && this.d != null;
    }

    public final void b(ht ht2, int n, int n2) {
        int n3 = this.e();
        if (!this.t_()) {
            if (this.d != null) {
                this.d.l();
            }
        } else {
            a.a(ht2, n, n2, this);
        }
        this.c.i(-14006936);
        if (!this.d()) {
            String string;
            w w2;
            block9: {
                w2 = this.c;
                int n4 = n3 - this.c.a(this.f);
                if (this.c.a(this.a) > n4) {
                    n4 -= this.c.a("...");
                    for (n3 = 2; n3 < this.a.length(); ++n3) {
                        if (this.c.a(this.a, 0, n3) <= n4) {
                            continue;
                        }
                        string = this.a.substring(0, n3 - 1) + "..." + this.f;
                        break block9;
                    }
                    string = this.a + this.f;
                } else {
                    string = this.a + this.f;
                }
            }
            w2.a(ht2, string, n + this.e, n2 + cu.d());
        } else {
            this.d.a(ht2, n + this.e, n2 + cu.d());
        }
        this.c.i(-16777216);
    }

    private void a() {
        if (this.c.a(this.a) > this.e() - this.c.a(this.f)) {
            this.d = new ij(this.c, this.a + this.f, this.e(), -14006936);
            return;
        }
        this.d = null;
    }

    public pt(int n, int n2, int n3, w w2, String string, String string2, int n4) {
        super(n, n2, n3, w2.l() + cu.d() * 2);
        this.c = w2;
        this.a = string;
        this.e = n4;
        if (string2.startsWith("/")) {
            string2 = "gmm" + gu.g().x().substring(4) + string2;
        }
        this.b = string2;
        string2 = this.b.startsWith("gmm:") ? "" : " \u0001\ued09";
        this.f = string2;
        this.a();
    }

    public final int a(pb pb2) {
        if (!this.t_()) {
            return super.a(pb2);
        }
        switch (pb2.c) {
            default: {
                return super.a(pb2);
            }
            case 7: 
        }
        return -3;
    }

    public final int a(nj nj2) {
        if (nj2.j() && this.t_()) {
            return -3;
        }
        return -1;
    }

    public final void c_(int n) {
        if (this.d()) {
            this.t();
        }
    }

    public final void b(int n, int n2) {
        if (n2 != this.r) {
            this.a();
        }
    }

    private int e() {
        return this.r - this.e - 2;
    }

    public static int a(w w2) {
        return w2.a("XX");
    }
}

