package com.bytedance.android.livesdk.browser.jsbridge.newmethods;

import X.0b0;
import X.1hK;
import X.C1313Fz8;
import X.C1430G2l;
import X.KLg;
import X.KMI;
import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;

public class ToastMethod extends KMI<Params, Object> {

    public static final class Params {
        @c(LIZ = "position")
        public int position;
        @c(LIZ = "text")
        public String text;
        @c(LIZ = "type")
        public String type;

        static {
            Covode.recordClassIndex(13032);
        }
    }

    static {
        Covode.recordClassIndex(13031);
    }

    public Object invoke(Params params, KLg kLg) {
        1hK LIZ = C1430G2l.LIZ((Context) C1430G2l.LIZIZ(kLg.LIZ));
        if (TextUtils.equals("info", params.type)) {
            C1313Fz8.LIZ((Activity) LIZ, params.text, 2131234861);
            return null;
        } else if (TextUtils.equals("warn", params.type)) {
            C1313Fz8.LIZ((Activity) LIZ, params.text, 2131234814);
            return null;
        } else if (params.position == 1) {
            C1313Fz8.LIZ(0b0.LJ(), params.text, 0);
            return null;
        } else {
            C1313Fz8.LIZ(kLg.LIZ, params.text, 0);
            return null;
        }
    }
}
