package com.tencent.mm.plugin.wallet.pay.ui;

import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.wallet_core.model.Bankcard;
import com.tencent.mm.plugin.wallet_core.ui.j.a;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.ui.base.h;
import java.util.LinkedList;
import java.util.List;

class WalletPayDeductUI$3 implements a {
    final /* synthetic */ WalletPayDeductUI tpn;
    final /* synthetic */ List tpo;

    WalletPayDeductUI$3(WalletPayDeductUI walletPayDeductUI, List list) {
        this.tpn = walletPayDeductUI;
        this.tpo = list;
    }

    public final void onClick(View view) {
        AppMethodBeat.i(46020);
        AppCompatActivity appCompatActivity = this.tpn.mController.ylL;
        List<Bankcard> list = this.tpo;
        String a = WalletPayDeductUI.a(this.tpn);
        Bankcard b = WalletPayDeductUI.b(this.tpn);
        1 1 = new 1(this);
        LinkedList linkedList = new LinkedList();
        if ((list == null || list.size() == 0) && bo.isNullOrNil(null)) {
            ab.w("MicroMsg.WalletDialogHelper", "hy: bankcard list is null and should not show new");
            AppMethodBeat.o(46020);
            return;
        }
        int i;
        if (list == null || list.size() == 0) {
            ab.i("MicroMsg.WalletDialogHelper", "hy: no bankcard show new only");
            linkedList.add(null);
            i = 0;
        } else {
            int i2 = 0;
            i = 0;
            for (Bankcard bankcard : list) {
                linkedList.add(bankcard.field_desc);
                if (b != null && b.equals(bankcard)) {
                    i = i2;
                }
                i2++;
            }
            if (!bo.isNullOrNil(null)) {
                linkedList.add(null);
                if (b == null) {
                    i = i2;
                }
            }
        }
        h.a(appCompatActivity, a, linkedList, i, 1);
        AppMethodBeat.o(46020);
    }
}
