package com.tencent.mm.plugin.profile.ui; import android.content.Context; import android.content.Intent; import com.tencent.mm.R; import com.tencent.mm.autogen.mmdata.rpt.MinishopPluginReportStruct; import com.tencent.mm.pluginsdk.model.e1; import com.tencent.mm.pluginsdk.ui.preference.HelperHeaderPreference; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.storage.i2; import com.tencent.mm.storage.z1; import com.tencent.mm.ui.base.preference.CheckBoxPreference; import d60.z; import i14.j; import ie1.h; import java.util.ArrayList; import jh2.k0; import k14.g; import nf0.w0; import p64.i0; import sv3.b; public class m1 implements gu3.a { /* renamed from: d reason: collision with root package name */ public final Context f138162d; /* renamed from: e reason: collision with root package name */ public z1 f138163e = null; /* renamed from: f reason: collision with root package name */ public g f138164f; /* renamed from: g reason: collision with root package name */ public CheckBoxPreference f138165g; /* renamed from: h reason: collision with root package name */ public CheckBoxPreference f138166h; /* renamed from: i reason: collision with root package name */ public a f138167i = null; public static class a { /* renamed from: a reason: collision with root package name */ public final MinishopPluginReportStruct f138168a = new MinishopPluginReportStruct(); public a(j1 j1Var) { } public final void a(int i15, int i16) { MinishopPluginReportStruct minishopPluginReportStruct = this.f138168a; minishopPluginReportStruct.f68966d = (long) i15; minishopPluginReportStruct.f68967e = (long) i16; minishopPluginReportStruct.n(); } } public m1(Context context) { this.f138162d = context; } @Override // gu3.a public boolean I(g gVar, z1 z1Var, boolean z15, int i15) { Log.i("MicroMsg.ContactWidgetMiniShopHelper", "onAttach"); this.f138164f = gVar; this.f138163e = z1Var; gVar.b(R.xml.f370532w); this.f138165g = (CheckBoxPreference) gVar.a("contact_info_mini_shop_helper_top"); this.f138166h = (CheckBoxPreference) gVar.a("contact_info_mini_shop_helper_not_disturb"); c(); return true; } @Override // gu3.a public boolean a(String str) { Log.i("MicroMsg.ContactWidgetMiniShopHelper", "handleEvent, key: " + str); if (str == null) { return false; } str.getClass(); char c15 = 65535; int i15 = 3; int i16 = 2; switch (str.hashCode()) { case -2027998924: if (str.equals("contact_info_mini_shop_helper_go_to")) { c15 = 0; break; } break; case -1521942243: if (str.equals("contact_info_mini_shop_helper_install")) { c15 = 1; break; } break; case -1450872065: if (str.equals("contact_info_mini_shop_helper_help")) { c15 = 2; break; } break; case 154744730: if (str.equals("contact_info_mini_shop_helper_clear_data")) { c15 = 3; break; } break; case 1338682839: if (str.equals("contact_info_mini_shop_helper_top")) { c15 = 4; break; } break; case 1342712804: if (str.equals("contact_info_mini_shop_helper_uninstall")) { c15 = 5; break; } break; case 1848846101: if (str.equals("contact_info_mini_shop_helper_not_disturb")) { c15 = 6; break; } break; } switch (c15) { case 0: Intent intent = new Intent(); intent.putExtra("Chat_User", this.f138163e.getUsername()); intent.putExtra("finish_direct", true); b.t(this.f138162d, ".ui.chatting.ChattingUI", intent, null); b().a(1, 1); return true; case 1: Context context = this.f138162d; i0 Q = j.Q(context, context.getString(R.string.f367625yv), this.f138162d.getString(R.string.iwq), true, true, null); Q.show(); z.d().a(30, new k1(this, Q)); ArrayList arrayList = new ArrayList(); arrayList.add("gh_579db1f2cf89"); ArrayList arrayList2 = new ArrayList(); arrayList2.add(1); z.d().f(new e1(1, arrayList, arrayList2, "", "")); return true; case 2: Intent intent2 = new Intent(); intent2.putExtra("rawUrl", ((h) yz3.j.c(h.class)).pi(h.c.CB, "https://developers.weixin.qq.com/community/minihome/article/doc/000000208c8018662cda04cf35b813")); intent2.putExtra("showShare", true); intent2.putExtra("allow_mix_content_mode", false); b.j(this.f138162d, "webview", "com.tencent.mm.plugin.webview.ui.tools.WebViewUI", intent2, null); b().a(5, 1); return true; case 3: Context context2 = this.f138162d; j.A(context2, context2.getString(R.string.bcu), "", this.f138162d.getString(R.string.f367399sl), this.f138162d.getString(R.string.f367394sg), new j1(this), null); return true; case 4: boolean R = this.f138165g.R(); a b15 = b(); if (!R) { i16 = 3; } b15.a(3, i16); if (R) { w0.n0(this.f138163e.getUsername(), true, true); } else { w0.v0(this.f138163e.getUsername(), true); } return true; case 5: Context context3 = this.f138162d; j.A(context3, context3.getString(R.string.iws), "", this.f138162d.getString(R.string.f367399sl), this.f138162d.getString(R.string.f367394sg), new l1(this), null); return true; case 6: boolean R2 = this.f138166h.R(); a b16 = b(); if (R2) { i15 = 2; } b16.a(4, i15); if (R2) { w0.j0(this.f138163e, true); } else { w0.s0(this.f138163e, true); } return true; default: return false; } } public final a b() { if (this.f138167i == null) { this.f138167i = new a(null); } return this.f138167i; } public final void c() { HelperHeaderPreference helperHeaderPreference = (HelperHeaderPreference) this.f138164f.a("contact_info_mini_shop_helper_header_helper"); helperHeaderPreference.Q(this.f138163e.getUsername(), this.f138163e.r3(), this.f138162d.getString(R.string.bf6)); if (this.f138163e.z3()) { helperHeaderPreference.R(1); this.f138164f.n("contact_info_mini_shop_helper_install", true); this.f138164f.n("contact_info_mini_shop_helper_uninstall", false); this.f138164f.n("contact_info_mini_shop_helper_go_to", false); this.f138164f.n("contact_info_mini_shop_helper_top", false); this.f138164f.n("contact_info_mini_shop_helper_not_disturb", false); this.f138164f.n("contact_info_mini_shop_helper_help", false); this.f138164f.n("contact_info_mini_shop_helper_clear_data", false); this.f138165g.S(((i2) ((k0) z.q(k0.class)).SM()).b0(this.f138163e.getUsername())); this.f138166h.S(w0.L(this.f138163e)); return; } helperHeaderPreference.R(0); this.f138164f.n("contact_info_mini_shop_helper_install", false); this.f138164f.n("contact_info_mini_shop_helper_uninstall", true); this.f138164f.n("contact_info_mini_shop_helper_go_to", true); this.f138164f.n("contact_info_mini_shop_helper_top", true); this.f138164f.n("contact_info_mini_shop_helper_not_disturb", true); this.f138164f.n("contact_info_mini_shop_helper_help", true); this.f138164f.n("contact_info_mini_shop_helper_clear_data", true); } @Override // gu3.a public void onActivityResult(int i15, int i16, Intent intent) { } @Override // gu3.a public boolean onDetach() { Log.i("MicroMsg.ContactWidgetMiniShopHelper", "onDetach"); return true; } }