package com.tencent.mm.plugin.wallet_payu.bind.ui;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.wallet_payu.bind.model.NetScenePayUElementQuery;
import com.tencent.mm.plugin.wallet_payu.bind.model.NetScenePayUElementQuery.PayUBankcardElement;
import com.tencent.mm.sdk.platformtools.bo;

protected class WalletPayUCardElementUI$b {
    final /* synthetic */ WalletPayUCardElementUI tSX;
    boolean tSY;
    boolean tSZ;
    boolean tTa;

    protected WalletPayUCardElementUI$b(WalletPayUCardElementUI walletPayUCardElementUI) {
        this.tSX = walletPayUCardElementUI;
    }

    /* Access modifiers changed, original: protected|final */
    public final void cTc() {
        AppMethodBeat.i(48364);
        this.tSY = WalletPayUCardElementUI.c(this.tSX).asa();
        this.tSZ = WalletPayUCardElementUI.b(this.tSX).asa();
        this.tTa = WalletPayUCardElementUI.a(this.tSX).asa();
        if (!WalletPayUCardElementUI.e(this.tSX) || this.tTa) {
            WalletPayUCardElementUI.f(this.tSX).setVisibility(4);
        } else {
            WalletPayUCardElementUI.f(this.tSX).setVisibility(0);
            WalletPayUCardElementUI.f(this.tSX).setText(2131304650);
        }
        int i;
        if (!WalletPayUCardElementUI.g(this.tSX)) {
            i = 0;
        } else if (!this.tSY) {
            WalletPayUCardElementUI.h(this.tSX).setVisibility(0);
            WalletPayUCardElementUI.h(this.tSX).setTextColor(this.tSX.getResources().getColor(2131690384));
            WalletPayUCardElementUI.h(this.tSX).setText(2131304636);
            i = 0;
        } else if (!WalletPayUCardElementUI.d(this.tSX).containsKey(WalletPayUCardElementUI.c(this.tSX).getText()) || WalletPayUCardElementUI.i(this.tSX).contains(WalletPayUCardElementUI.c(this.tSX).getText())) {
            this.tSX.a(new NetScenePayUElementQuery(WalletPayUCardElementUI.c(this.tSX).getText()), false, false);
            WalletPayUCardElementUI.i(this.tSX).add(WalletPayUCardElementUI.c(this.tSX).getText());
            WalletPayUCardElementUI.h(this.tSX).setVisibility(0);
            WalletPayUCardElementUI.h(this.tSX).setTextColor(this.tSX.getResources().getColor(2131690164));
            WalletPayUCardElementUI.h(this.tSX).setText(this.tSX.getString(2131304615));
            boolean i2 = true;
        } else {
            PayUBankcardElement payUBankcardElement = (PayUBankcardElement) WalletPayUCardElementUI.d(this.tSX).get(WalletPayUCardElementUI.c(this.tSX).getText());
            WalletPayUCardElementUI.h(this.tSX).setVisibility(0);
            if (bo.isNullOrNil(payUBankcardElement.tSG)) {
                WalletPayUCardElementUI.h(this.tSX).setTextColor(this.tSX.getResources().getColor(2131690384));
                WalletPayUCardElementUI.h(this.tSX).setText(payUBankcardElement.tSH);
                this.tSY = false;
                i2 = 0;
            } else {
                WalletPayUCardElementUI.h(this.tSX).setTextColor(this.tSX.getResources().getColor(2131690164));
                WalletPayUCardElementUI.h(this.tSX).setText(payUBankcardElement.tSH);
                i2 = 0;
            }
        }
        if (this.tSY && this.tSZ && this.tTa && i2 == 0) {
            WalletPayUCardElementUI.j(this.tSX).setEnabled(true);
            AppMethodBeat.o(48364);
            return;
        }
        WalletPayUCardElementUI.j(this.tSX).setEnabled(false);
        AppMethodBeat.o(48364);
    }
}
