package com.bytedance.sdk.openadsdk.common;

import android.content.Context;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.bytedance.sdk.component.ef.wsy;
import com.bytedance.sdk.openadsdk.core.model.lse;
import com.bytedance.sdk.openadsdk.core.widget.fm.wsy;

/* JADX INFO: loaded from: classes2.dex */
public class dsz {
    private final String ajl;
    private final lse fm;
    private ImageView jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private final Context f6841lb;
    private RelativeLayout ro;
    private maa wsy;
    private boolean wu;
    private com.bytedance.sdk.component.ef.wsy yz;

    public dsz(Context context, lse lseVar, String str, boolean z10) {
        this.f6841lb = context;
        this.fm = lseVar;
        this.ajl = str;
        this.wu = z10;
        jnr();
    }

    private static RelativeLayout fm(Context context, boolean z10) {
        RelativeLayout relativeLayout = new RelativeLayout(context);
        relativeLayout.setBackgroundColor(-1);
        relativeLayout.addView(new ef(context));
        wsy.lb lbVar = wsy.lb.LANDING_PAGE;
        new com.bytedance.sdk.component.ef.wsy(context, lbVar);
        com.bytedance.sdk.component.ef.wsy wsyVar = z10 ? new com.bytedance.sdk.component.ef.wsy(context, wsy.lb.PRIVACY) : new com.bytedance.sdk.component.ef.wsy(context, lbVar);
        wsyVar.setId(com.bytedance.sdk.openadsdk.utils.qhl.f7557ib);
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
        layoutParams.addRule(12);
        layoutParams.addRule(3, com.bytedance.sdk.openadsdk.utils.qhl.xca);
        if (z10) {
            relativeLayout.addView(wsyVar, layoutParams);
        }
        return relativeLayout;
    }

    private void jnr() {
        RelativeLayout relativeLayoutFm = fm(this.f6841lb, this.wu);
        this.ro = relativeLayoutFm;
        this.yz = (com.bytedance.sdk.component.ef.wsy) relativeLayoutFm.findViewById(com.bytedance.sdk.openadsdk.utils.qhl.f7557ib);
        maa maaVar = new maa(this.f6841lb, (RelativeLayout) this.ro.findViewById(com.bytedance.sdk.openadsdk.utils.qhl.xca), this.fm, this.yz, this.ajl, this.wu);
        this.wsy = maaVar;
        this.jnr = maaVar.jnr();
    }

    public com.bytedance.sdk.component.ef.wsy lb() {
        return this.yz;
    }

    public void ro() {
        maa maaVar = this.wsy;
        if (maaVar != null) {
            maaVar.lb();
        }
    }

    public View yz() {
        return this.ro;
    }

    public void ro(String str) {
        this.wsy.ro(str);
    }

    public void fm() {
        maa maaVar = this.wsy;
        if (maaVar != null) {
            maaVar.ro();
        }
    }

    public void fm(WebView webView, wsy.fm fmVar) {
        maa maaVar = this.wsy;
        if (maaVar != null) {
            maaVar.fm(webView, fmVar);
        }
    }

    public void fm(String str) {
        this.wsy.fm(str);
    }

    public void fm(boolean z10) {
        this.wsy.fm(z10);
    }
}
