package com.tencent.mm.plugin.appbrand.widget.input.panel;

import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;

class AppBrandSmileyGrid$1 implements OnItemClickListener {
    final /* synthetic */ AppBrandSmileyGrid jiC;

    AppBrandSmileyGrid$1(AppBrandSmileyGrid appBrandSmileyGrid) {
        this.jiC = appBrandSmileyGrid;
    }

    public final void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
        AppMethodBeat.i(134307);
        if (i == AppBrandSmileyGrid.a(this.jiC).getCount() - 1) {
            if (AppBrandSmileyGrid.b(this.jiC).jiK != null) {
                AppBrandSmileyGrid.b(this.jiC).jiK.aRg();
            }
            AppMethodBeat.o(134307);
        } else if ((AppBrandSmileyGrid.c(this.jiC) * (AppBrandSmileyGrid.d(this.jiC) - 1)) + i >= AppBrandSmileyGrid.e(this.jiC)) {
            AppMethodBeat.o(134307);
        } else {
            int c = (AppBrandSmileyGrid.c(this.jiC) * (AppBrandSmileyGrid.d(this.jiC) - 1)) + i;
            if (AppBrandSmileyGrid.b(this.jiC).jiK != null) {
                AppBrandSmileyGrid.b(this.jiC).jiK.append(AppBrandSmileyGrid.b(this.jiC).aRr().qL(c));
            }
            AppMethodBeat.o(134307);
        }
    }
}
