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

import android.content.Context;
import android.os.Bundle;
import android.view.MenuItem;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.sns.data.i;
import com.tencent.mm.plugin.sns.model.af;
import com.tencent.mm.plugin.sns.model.an;
import com.tencent.mm.plugin.sns.model.r;
import com.tencent.mm.plugin.sns.storage.n;
import com.tencent.mm.plugin.sns.ui.s.8;
import com.tencent.mm.protocal.protobuf.bau;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.ui.base.h;
import com.tencent.mm.ui.base.n.d;
import com.tencent.ytcommon.BuildConfig;

class s$3 implements d {
    final /* synthetic */ bau qIs;
    final /* synthetic */ s rjs;
    final /* synthetic */ n rjt;
    final /* synthetic */ int sN;

    s$3(s sVar, n nVar, bau bau, int i) {
        this.rjs = sVar;
        this.rjt = nVar;
        this.qIs = bau;
        this.sN = i;
    }

    public final void onMMMenuItemSelected(MenuItem menuItem, int i) {
        AppMethodBeat.i(38253);
        int itemId = menuItem.getItemId();
        ab.d("MicroMsg.GalleryTitleManager", "showAlertWithDel ".concat(String.valueOf(itemId)));
        s sVar;
        r rVar;
        Context context;
        switch (itemId) {
            case -1:
                if (this.rjt.cqu().xfI.wbK.size() <= 1) {
                    h.a(this.rjs.context, this.rjs.context.getString(2131303739), BuildConfig.FLAVOR, new 2(this), null);
                    break;
                }
                h.a(this.rjs.context, this.rjs.context.getString(2131303741), BuildConfig.FLAVOR, new 1(this), null);
                AppMethodBeat.o(38253);
                return;
            case 1:
                sVar = this.rjs;
                n nVar = this.rjt;
                if (nVar.cqV() || nVar.cqW()) {
                    af.cnF().DL(nVar.reX);
                    AppMethodBeat.o(38253);
                    return;
                }
                rVar = new r(nVar.field_snsId, 2);
                g.RQ();
                g.RO().eJo.a(rVar, 0);
                context = sVar.context;
                sVar.context.getString(2131297061);
                sVar.tipDialog = h.b(context, sVar.context.getString(2131303764), true, new 8(sVar, rVar));
                AppMethodBeat.o(38253);
                return;
            case 2:
                if (!(this.rjt == null || this.rjt.cqu().xfI == null)) {
                    if (this.rjt.field_type != 15) {
                        com.tencent.mm.pluginsdk.ui.tools.n.j(an.fZ(af.getAccSnsPath(), this.qIs.Id) + i.l(this.qIs), this.rjs.context);
                        AppMethodBeat.o(38253);
                        return;
                    }
                    s.Zx(this.rjt.cqU());
                    AppMethodBeat.o(38253);
                    return;
                }
            case 3:
                if (!(this.rjt == null || this.rjt.cqu().xfI == null)) {
                    if (this.rjt.cqu().xfI.wbJ == 1) {
                        this.rjs.Zw(an.fZ(af.getAccSnsPath(), this.qIs.Id) + i.l(this.qIs));
                        AppMethodBeat.o(38253);
                        return;
                    }
                    s.Zy(this.rjt.cqU());
                    AppMethodBeat.o(38253);
                    return;
                }
            case 5:
                sVar = this.rjs;
                rVar = new r(this.rjt.field_snsId, 3);
                g.RQ();
                g.RO().eJo.a(rVar, 0);
                context = sVar.context;
                sVar.context.getString(2131297061);
                sVar.tipDialog = h.b(context, sVar.context.getString(2131303764), true, new s$9(sVar, rVar));
                AppMethodBeat.o(38253);
                return;
            case 6:
                if (!(this.rjt == null || this.rjt.cqu().xfI == null)) {
                    s.a(this.rjs, this.rjt, this.qIs);
                    AppMethodBeat.o(38253);
                    return;
                }
            case 7:
                Bundle bundle = new Bundle();
                bundle.putString("stat_msg_id", "sns_" + i.jV(this.rjt.field_snsId));
                bundle.putString("stat_send_msg_user", this.rjt.field_userName);
                bundle.putInt("stat_scene", 3);
                s.a(this.rjs, bundle);
                AppMethodBeat.o(38253);
                return;
            case 8:
                s.a(this.rjs, this.rjt, this.qIs, this.sN);
                AppMethodBeat.o(38253);
                return;
        }
        AppMethodBeat.o(38253);
    }
}
