package com.tencent.mm.plugin.product.ui;

import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.bp.d;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.product.b.c;
import com.tencent.mm.plugin.product.b.j;
import com.tencent.mm.plugin.product.c.m;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.ui.base.t;
import java.util.Iterator;

class MallProductSelectSkuUI$4 implements OnClickListener {
    final /* synthetic */ MallProductSelectSkuUI pju;

    MallProductSelectSkuUI$4(MallProductSelectSkuUI mallProductSelectSkuUI) {
        this.pju = mallProductSelectSkuUI;
    }

    public final void onClick(View view) {
        AppMethodBeat.i(44109);
        f d = MallProductSelectSkuUI.d(this.pju);
        if (d.piI) {
            t.makeText(d.gNy, 2131301349, 1).show();
            AppMethodBeat.o(44109);
        } else if (!d.piK.bZQ()) {
            String str;
            c cVar = d.piK;
            if (cVar.pha != null && cVar.pha.size() < cVar.pgY && cVar.pgY > 0) {
                Iterator it = cVar.pgO.phs.phM.iterator();
                while (it.hasNext()) {
                    m mVar = (m) it.next();
                    if (!cVar.pha.containsKey(mVar.phX)) {
                        str = mVar.phY;
                        break;
                    }
                }
            }
            str = null;
            if (!bo.isNullOrNil(str)) {
                t.makeText(d.gNy, d.gNy.getString(2131301358, new Object[]{str}), 0).show();
            }
            AppMethodBeat.o(44109);
        } else if (d.piK.pgU != null) {
            g.RQ();
            g.RO().eJo.a(new j(d.piK.bZS(), f.gOW), 0);
            AppMethodBeat.o(44109);
        } else {
            d.c(d.gNy, "address", ".ui.WalletAddAddressUI", 2);
            AppMethodBeat.o(44109);
        }
    }
}
