package com.bytedance.sdk.component.adexpress.dynamic.lb;

import android.content.Context;
import android.view.View;
import android.widget.FrameLayout;
import com.bytedance.sdk.component.adexpress.ajl.gof;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes.dex */
public class fhx implements wsy<com.bytedance.sdk.component.adexpress.ajl.gof> {
    private int ajl;

    /* JADX INFO: renamed from: ef, reason: collision with root package name */
    private JSONObject f6486ef;
    private com.bytedance.sdk.component.adexpress.ajl.gof fm;
    private String jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private com.bytedance.sdk.component.adexpress.dynamic.dynamicview.jnr f6487lb;
    private Context ro;
    private int wsy;
    private int wu;
    private com.bytedance.sdk.component.adexpress.dynamic.yz.wsy yz;

    public fhx(Context context, com.bytedance.sdk.component.adexpress.dynamic.dynamicview.jnr jnrVar, com.bytedance.sdk.component.adexpress.dynamic.yz.wsy wsyVar, String str, int i10, int i11, int i12, JSONObject jSONObject) {
        this.ro = context;
        this.f6487lb = jnrVar;
        this.yz = wsyVar;
        this.jnr = str;
        this.ajl = i10;
        this.wsy = i11;
        this.wu = i12;
        this.f6486ef = jSONObject;
        jnr();
    }

    private void jnr() {
        final com.bytedance.sdk.component.adexpress.dynamic.ajl.fm dynamicClickListener = this.f6487lb.getDynamicClickListener();
        try {
            new JSONObject().put("convertActionType", 1);
        } catch (Throwable unused) {
        }
        if ("16".equals(this.jnr)) {
            Context context = this.ro;
            com.bytedance.sdk.component.adexpress.ajl.gof gofVar = new com.bytedance.sdk.component.adexpress.ajl.gof(context, com.bytedance.sdk.component.adexpress.lb.fm.wu(context), this.ajl, this.wsy, this.wu, this.f6486ef);
            this.fm = gofVar;
            if (gofVar.getShakeLayout() != null) {
                this.fm.getShakeLayout().setOnClickListener((View.OnClickListener) dynamicClickListener);
            }
        } else {
            Context context2 = this.ro;
            this.fm = new com.bytedance.sdk.component.adexpress.ajl.gof(context2, com.bytedance.sdk.component.adexpress.lb.fm.wsy(context2), this.ajl, this.wsy, this.wu, this.f6486ef);
        }
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
        this.fm.setGravity(17);
        layoutParams.gravity = 17;
        this.fm.setLayoutParams(layoutParams);
        this.fm.setTranslationY(com.bytedance.sdk.component.adexpress.yz.wsy.fm(this.ro, this.yz.rka()));
        this.fm.setShakeText(this.yz.lmk());
        this.fm.setClipChildren(false);
        this.fm.setOnShakeViewListener(new gof.fm() { // from class: com.bytedance.sdk.component.adexpress.dynamic.lb.fhx.1
        });
    }

    @Override // com.bytedance.sdk.component.adexpress.dynamic.lb.wsy
    public void fm() {
        this.fm.fm();
    }

    @Override // com.bytedance.sdk.component.adexpress.dynamic.lb.wsy
    public void ro() {
        this.fm.clearAnimation();
    }

    @Override // com.bytedance.sdk.component.adexpress.dynamic.lb.wsy
    /* JADX INFO: renamed from: yz, reason: merged with bridge method [inline-methods] */
    public com.bytedance.sdk.component.adexpress.ajl.gof lb() {
        return this.fm;
    }
}
