package com.tencent.mm.plugin.appbrand.jsapi.m;

import android.widget.NumberPicker;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.jsapi.m.a.2;
import com.tencent.mm.plugin.appbrand.widget.picker.AppBrandDatePicker;
import com.tencent.mm.plugin.appbrand.widget.picker.a;

class a$1 implements Runnable {
    final /* synthetic */ a hUc;

    a$1(a aVar) {
        this.hUc = aVar;
    }

    public final void run() {
        boolean z = true;
        int i = 0;
        AppMethodBeat.i(126336);
        a aVar = this.hUc;
        AppBrandDatePicker appBrandDatePicker = (AppBrandDatePicker) aVar.an(AppBrandDatePicker.class);
        if (appBrandDatePicker == null) {
            aVar.l("fail cant init view", null);
            AppMethodBeat.o(126336);
            return;
        }
        boolean z2;
        a aVar2 = aVar.jks;
        aVar2.setOnResultListener(new 2(aVar));
        if (aVar.hTX != null) {
            appBrandDatePicker.setMinDate(aVar.hTX.longValue());
        }
        if (aVar.hTY != null) {
            appBrandDatePicker.setMaxDate(aVar.hTY.longValue());
        }
        appBrandDatePicker.a(aVar.hTZ, aVar.hUa, aVar.hUb, null);
        boolean z3 = aVar.hTW.ordinal() >= a.a.hUd.ordinal();
        if (aVar.hTW.ordinal() >= a.a.hUe.ordinal()) {
            z2 = true;
        } else {
            z2 = false;
        }
        if (aVar.hTW.ordinal() < a.a.hUf.ordinal()) {
            z = false;
        }
        appBrandDatePicker.jkt = z3;
        appBrandDatePicker.jku = z2;
        appBrandDatePicker.jkv = z;
        if (appBrandDatePicker.jkw != null) {
            appBrandDatePicker.jkw.setEnabled(z3);
            appBrandDatePicker.jkw.setVisibility(z3 ? 0 : 8);
        }
        if (appBrandDatePicker.jkx != null) {
            int i2;
            appBrandDatePicker.jkx.setEnabled(z2);
            NumberPicker numberPicker = appBrandDatePicker.jkx;
            if (z2) {
                i2 = 0;
            } else {
                i2 = 8;
            }
            numberPicker.setVisibility(i2);
        }
        if (appBrandDatePicker.jky != null) {
            appBrandDatePicker.jky.setEnabled(z);
            NumberPicker numberPicker2 = appBrandDatePicker.jky;
            if (!z) {
                i = 8;
            }
            numberPicker2.setVisibility(i);
        }
        aVar2.show();
        AppMethodBeat.o(126336);
    }
}
