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

import android.content.Context;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.fav.ui.a.c;
import com.tencent.mm.plugin.fav.ui.widget.FavSearchActionView;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.ytcommon.BuildConfig;

class FavSearchUI$9 extends c {
    final /* synthetic */ FavSearchUI mjo;

    FavSearchUI$9(FavSearchUI favSearchUI, Context context) {
        this.mjo = favSearchUI;
        super(context);
    }

    public final void Ma(String str) {
        AppMethodBeat.i(74076);
        FavSearchActionView b = FavSearchUI.b(this.mjo);
        b.mpS.add(str);
        if (b.mjS == null) {
            AppMethodBeat.o(74076);
            return;
        }
        b.mjS.setEditHint(BuildConfig.FLAVOR);
        b.mjS.cc(str, true);
        if (b.mpU == null) {
            AppMethodBeat.o(74076);
            return;
        }
        b.Mh(b.mjS.getEditText());
        b.mpU.a(b.mlj, b.mpT, b.mpS, false);
        h.pYm.e(11126, new Object[]{Integer.valueOf(2)});
        AppMethodBeat.o(74076);
    }

    public final void Mb(String str) {
        AppMethodBeat.i(74077);
        FavSearchActionView b = FavSearchUI.b(this.mjo);
        b.mpS.remove(str);
        if (b.mjS == null) {
            AppMethodBeat.o(74077);
            return;
        }
        if (b.mpS.isEmpty()) {
            b.mjS.setEditHint(b.getResources().getString(2131297040));
        }
        b.mjS.removeTag(str);
        if (b.mpU == null) {
            AppMethodBeat.o(74077);
            return;
        }
        b.Mh(b.mjS.getEditText());
        b.mpU.a(b.mlj, b.mpT, b.mpS, true);
        AppMethodBeat.o(74077);
    }
}
