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

import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.game.e.b;
import com.tencent.mm.plugin.game.f.c;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import java.util.LinkedList;

class GameSearchUI$6 implements OnItemClickListener {
    final /* synthetic */ GameSearchUI nmW;

    GameSearchUI$6(GameSearchUI gameSearchUI) {
        this.nmW = gameSearchUI;
    }

    public final void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
        AppMethodBeat.i(112193);
        s$a wO = ((s) adapterView.getAdapter()).wO(i);
        if (bo.isNullOrNil(wO.text)) {
            AppMethodBeat.o(112193);
        } else if (bo.isNullOrNil(wO.appId)) {
            LinkedList linkedList = new LinkedList();
            linkedList.add(wO.text);
            GameSearchUI.b(this.nmW, linkedList);
            GameSearchUI.h(this.nmW);
            AppMethodBeat.o(112193);
        } else {
            int b;
            switch (wO.actionType) {
                case 1:
                    Bundle bundle = new Bundle();
                    bundle.putCharSequence("game_app_id", wO.appId);
                    bundle.putInt("game_report_from_scene", 1402);
                    b = c.b(this.nmW, wO.appId, null, bundle);
                    b.a(this.nmW, 14, 1402, i, b, wO.appId, GameSearchUI.g(this.nmW), null);
                    AppMethodBeat.o(112193);
                    return;
                case 2:
                    b = c.t(this.nmW.mController.ylL, wO.nmB, "game_center_detail");
                    b.a(this.nmW, 14, 1402, i, b, wO.appId, GameSearchUI.g(this.nmW), null);
                    AppMethodBeat.o(112193);
                    return;
                default:
                    ab.e("MicroMsg.GameSearchUI", "unknowed actionType : " + wO.actionType);
                    AppMethodBeat.o(112193);
                    return;
            }
        }
    }
}
