/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  javax.microedition.lcdui.Command
 *  javax.microedition.lcdui.CommandListener
 *  javax.microedition.lcdui.DateField
 *  javax.microedition.lcdui.Display
 *  javax.microedition.lcdui.Displayable
 *  javax.microedition.lcdui.Form
 *  javax.microedition.lcdui.Item
 */
import java.io.DataInput;
import java.io.DataOutput;
import java.io.OutputStream;
import java.util.Date;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.DateField;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.Item;

/*
 * Duplicate member names - consider using --renamedupmembers true
 */
public final class aq
implements jr,
jf,
jq,
Runnable,
CommandListener {
    private final jt a;
    private final bu a;
    private final ab a;
    private final aq c;
    private final cq e;
    private final cq f;
    private final fc f;
    private final Command g;
    private final Command h;
    private final Display l;
    public final boolean e;
    private mt a;
    private DateField b;
    private Form c;
    private Displayable d;
    private Date k;
    public lk a;
    public fk a;
    public le b;
    public fk b;
    public lk b;
    public byte[] c;
    public lk c;
    public char d;
    public lk d;
    public int i;
    public String j;
    public long m;

    public boolean y_() {
        return true;
    }

    public boolean z_() {
        return true;
    }

    public boolean A_() {
        return this.e;
    }

    public static char a(aq aq2) {
        return aq2.d;
    }

    public Date b() {
        return this.k;
    }

    public final lk d() {
        return this.c;
    }

    public final fk B_() {
        return this.a;
    }

    public final fk b() {
        return this.b;
    }

    public aq() {
    }

    public aq(Display display, mt mt2, String string, cq cq2, cq cq3) {
        this.k = new Date();
        this.l = display;
        this.a = mt2;
        this.j = string;
        this.e = cq2;
        this.f = cq3;
        this.i = 3;
        this.g = new Command(cq2.g, 4, cq2.i);
        this.h = new Command(cq3.g, 3, cq3.i);
    }

    private aq(fc fc2, String string, iv iv2, int n, int n2, String string2, String string3, String string4, String string5, String string6) {
        this.f = fc2;
        this.e = true;
        this.c = new lk(la.bi);
        aq.a(this.c, true, string5, string6);
        lk lk2 = this.c.a(2);
        this.c.b(2, lk2);
        lk2.b(3, string);
        lk2.b(4, iv2.b());
        lk2.h(5, n2);
        lk2.b(6, string2);
        lk2.b(7, string3);
        lk2.b(8, string4);
        lk2.h(9, gu.g(n));
    }

    private aq(fc fc2) {
        this.f = fc2;
        this.c = new lk(la.bi);
        aq.a(this.c, false, null, null);
        this.e = false;
    }

    public aq(aq aq2, byte[] byArray, String string) {
        this.c = aq2;
        this.c = byArray;
        this.j = string;
    }

    private aq(String string, int n, byte[] byArray) {
        this.j = string;
        this.i = n;
        this.c = byArray;
    }

    public void b() {
        Displayable displayable = this.l.getCurrent();
        if (displayable != this.c) {
            this.d = displayable;
        }
        this.m = System.currentTimeMillis();
        if (this.c == null) {
            this.c = new Form(this.j);
            this.b = new DateField("", this.i);
            this.b.setDate(this.k);
            this.c.append((Item)this.b);
            this.c.addCommand(this.g);
            this.c.addCommand(this.h);
            this.c.setCommandListener((CommandListener)this);
        }
        this.l.setCurrent((Displayable)this.c);
    }

    public void a(Date date) {
        this.k = date;
        if (this.b != null) {
            this.b.setDate(this.k);
        }
    }

    public void a(int n) {
        this.i = n;
        if (this.b != null) {
            this.b.setInputMode(this.i);
        }
    }

    private static void a(lk lk2, boolean bl2, String string, String string2) {
        lk lk3 = new lk(la.t);
        lk2.b(1, lk3);
        lk lk4 = new lk(la.q);
        lk4.h(16, 2);
        lk3.b(1, lk4);
        if (bl2) {
            lk lk5 = lk3.a(2);
            lk3.b(2, lk5);
            lk5.b(3, string);
            lk5.b(4, string2);
        }
    }

    public void run() {
        if (this.c != null) {
            ab.a(this.c.a, lh.k().g().a(this.c, 0, this.c.length));
            ab.a(this.c.a, this.j);
        }
        ab.a(this.c.a, 1);
        ab.a(this.c.a);
    }

    public static le b(aq aq2) {
        if (aq2.b == null) {
            aq2.b = lh.k().g().a(aq2.c, 0, aq2.c.length);
        }
        return aq2.b;
    }

    public void commandAction(Command command, Displayable object) {
        if (System.currentTimeMillis() > this.m + (long)1000) {
            this.k = this.b.getDate();
            this.l.setCurrent(this.d);
            object = this.a;
            cq cq2 = command == this.h ? this.f : this.e;
            object.a(cq2, this);
        }
    }

    public void c(int n) {
        switch (n) {
            default: {
                this.a.w.a(lh.d(154), 0);
                return;
            }
            case 7: 
        }
        this.a.w.a(lh.d(205), 0);
    }

    public void a() {
        this.a.w.a(lh.d(176), 2);
    }

    public boolean a(DataInput dataInput) {
        this.b = ar.a(la.bj, dataInput);
        this.a = this.b.f(2);
        this.d = this.b.f(3);
        this.f.a(this);
        return true;
    }

    public le h() {
        byte[] byArray = gu.a(this.a.f(2).c(3));
        return lh.k().g().a(byArray, 0, byArray.length);
    }

    public String i() {
        return this.a.f(2).g(4);
    }

    public int f() {
        return (int)ar.e(this.a, 1);
    }

    public int g() {
        return (int)ar.e(this.d, 4);
    }

    public boolean e() {
        return this.b.b(1);
    }

    public void e(String string) {
        this.a.b.a(string);
        this.a.b((String)null);
        this.a.b.a(0);
        bu.b(this.a);
    }

    public void a(DataOutput dataOutput) {
        dataOutput.writeInt(this.c.b());
        this.c.a((OutputStream)((Object)dataOutput));
    }

    public void a(byte[] byArray, String string) {
        this.a.r.a(new aq(this, byArray, string));
    }

    public static aq a(fc fc2) {
        return new aq(fc2);
    }

    public static aq a(fc fc2, String string, iv iv2, int n, int n2, String string2, String string3, String string4, String string5, String string6) {
        return new aq(fc2, string, iv2, n, n2, string2, string3, string4, string5, string6);
    }

    public static aq a(lk lk2) {
        String string = lk2.g(1);
        int n = lk2.d(2);
        if (lk2.h(3)) {
            return new aq(string, n, lk2.c(3));
        }
        return new aq(string, n, null);
    }

    public aq(bu bu2, jt jt2) {
        this.a = bu2;
        this.a = jt2;
    }

    public aq(fk fk2, fk fk3) {
        this.a = fk2;
        this.b = fk3;
    }

    public aq(ab ab2) {
        this.a = ab2;
    }

    public aq(bu bu2) {
        this.a = bu2;
    }

    public aq(fu fu2, byte[] byArray, long l, char c, gm gm2) {
        this(fu2, byArray, l, c);
    }

    public aq(fk fk2, fk fk3, lk lk2) {
        this(fk2, fk3);
        this.c = lk2;
    }

    private aq(fu fu2, byte[] byArray, long l, char c) {
        this.d = c;
        this.m = l;
        this.c = byArray;
    }

    public int z() {
        return 49;
    }

    public void t() {
        throw new IllegalStateException();
    }

    public void f(String string) {
        throw new IllegalStateException();
    }
}

