package com.bytedance.sdk.openadsdk.component.reward.fm;

import android.app.Activity;
import android.content.Context;
import android.util.SparseArray;
import android.view.View;
import com.bytedance.sdk.openadsdk.core.lb.lb;
import com.bytedance.sdk.openadsdk.core.model.lse;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
public class jnr {
    private boolean ajl;
    com.bytedance.sdk.openadsdk.sds.fm.fm.lb fm;
    private final Activity jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private final String f6928lb;
    private final lse ro;
    private final Context yz;

    public interface fm {
        void fm(View view, float f10, float f11, float f12, float f13, SparseArray<lb.fm> sparseArray, int i10, int i11, int i12);

        void fm(String str, JSONObject jSONObject);
    }

    public jnr(lse lseVar, String str, Context context, Activity activity) {
        this.ro = lseVar;
        this.f6928lb = str;
        this.yz = context;
        this.jnr = activity;
    }

    private void yz() {
        if (this.ro.oy() == 4) {
            this.fm = com.bytedance.sdk.openadsdk.sds.fm.fm.yz.fm(this.yz, this.f6928lb);
        }
        if (this.fm == null) {
            this.fm = com.bytedance.sdk.openadsdk.sds.fm.fm.yz.fm(this.jnr, this.f6928lb);
        }
    }

    public void fm() {
        if (this.ajl) {
            return;
        }
        this.ajl = true;
        yz();
    }

    public com.bytedance.sdk.openadsdk.sds.fm.fm.lb lb() {
        return this.fm;
    }

    public void ro() {
        com.bytedance.sdk.openadsdk.sds.fm.fm.lb lbVar = this.fm;
        if (lbVar != null) {
            lbVar.fm(this.ro);
        }
    }

    public void fm(View view, float f10, float f11, float f12, float f13, SparseArray<lb.fm> sparseArray, int i10, int i11, int i12, fm fmVar) {
        if (this.fm == null) {
            fmVar.fm(view, f10, f11, f12, f13, sparseArray, i10, i11, i12);
            return;
        }
        int id2 = view.getId();
        if (id2 == com.bytedance.sdk.openadsdk.utils.qhl.wsy) {
            fmVar.fm("click_play_star_level", null);
            return;
        }
        if (id2 == com.bytedance.sdk.openadsdk.utils.qhl.ajl) {
            fmVar.fm("click_play_star_nums", null);
        } else if (id2 == com.bytedance.sdk.openadsdk.utils.qhl.jnr) {
            fmVar.fm("click_play_source", null);
        } else if (id2 == com.bytedance.sdk.openadsdk.utils.qhl.yz) {
            fmVar.fm("click_play_logo", null);
        }
    }
}
