package com.ss.android.ugc.aweme.upvote.detail.panel;

import X.0CB;
import X.0CN;
import X.2GO;
import X.2HZ;
import X.4HR;
import X.4bl;
import X.7he;
import X.A44;
import X.AnonymousClass9oX;
import X.C0445A3d;
import X.C0448A3g;
import X.C0449A3h;
import X.C0450A3i;
import X.C0451A3j;
import X.C0453A3l;
import X.Crj;
import X.ISm;
import X.M12;
import X.Mjy;
import X.Rc9;
import X.SsI;
import com.bytedance.assem.arch.viewModel.AssemViewModel;
import com.bytedance.covode.number.Covode;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import org.greenrobot.eventbus.ThreadMode;

public final class UpvoteDetailPanelViewModel extends AssemViewModel<C0453A3l> implements 2HZ, 2GO {
    public final Crj LIZ = 7he.LIZ(C0451A3j.LIZ);
    public final Crj LIZIZ = 7he.LIZ(C0449A3h.LIZ);
    public final Crj LIZJ = 7he.LIZ(C0450A3i.LIZ);

    static {
        Covode.recordClassIndex(121645);
    }

    public final Mjy LIZ() {
        return (Mjy) this.LIZ.getValue();
    }

    public final HashMap<String, C0445A3d> LIZIZ() {
        return (HashMap) this.LIZIZ.getValue();
    }

    public final HashSet<String> LIZJ() {
        return (HashSet) this.LIZJ.getValue();
    }

    public final Map<Integer, Object> getSubscriberEventTypes() {
        HashMap hashMap = new HashMap();
        hashMap.put(190, new Rc9(UpvoteDetailPanelViewModel.class, "onUserBlocked", AnonymousClass9oX.class, ThreadMode.POSTING, 0, false));
        return hashMap;
    }

    public final void onPrepared() {
        UpvoteDetailPanelViewModel.super.onPrepared();
        SsI.LIZ(this);
    }

    public final /* synthetic */ 4HR defaultState() {
        return new C0453A3l(A44.LOADING, true, 0.0f, new 4bl(false));
    }

    @0CN(LIZ = 0CB.ON_DESTROY)
    public final void onDestroy() {
        LIZ().LIZ();
        LIZIZ().clear();
        LIZJ().clear();
        SsI.LIZIZ(this);
    }

    @ISm
    public final void onUserBlocked(AnonymousClass9oX r2) {
        M12.LIZ(r2);
        setState(C0448A3g.LIZ);
    }

    public final boolean LIZ(String str) {
        M12.LIZ(str);
        C0445A3d a3d = LIZIZ().get(str);
        if (a3d == null || !a3d.LIZ) {
            return false;
        }
        return true;
    }
}
