package com.bytedance.sdk.openadsdk.core.yz;

import android.content.Context;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import com.bytedance.sdk.openadsdk.AdSlot;
import com.bytedance.sdk.openadsdk.api.banner.PAGBannerAdWrapperListener;
import com.bytedance.sdk.openadsdk.api.nativeAd.PAGNativeAd;
import com.bytedance.sdk.openadsdk.core.model.lse;
import com.bytedance.sdk.openadsdk.core.vt.sds;
import com.bytedance.sdk.openadsdk.core.vt.wey;
import com.bytedance.sdk.openadsdk.hi.ro.jnr;

/* JADX INFO: loaded from: classes2.dex */
public class lb extends yz {

    /* JADX INFO: renamed from: ef, reason: collision with root package name */
    private int f7375ef;
    private int vt;
    private com.bytedance.sdk.openadsdk.fm.fm.ro wu;

    public lb(@NonNull Context context, lse lseVar, AdSlot adSlot, boolean z10) {
        super(context, lseVar, adSlot, z10);
        this.f7375ef = 1;
        this.vt = -1;
    }

    public com.bytedance.sdk.openadsdk.gqi.lb.fm getVideoModel() {
        sds sdsVar = this.ro;
        if (sdsVar != null) {
            return ((wey) sdsVar).getVideoModel();
        }
        return null;
    }

    @Override // com.bytedance.sdk.openadsdk.core.yz.yz
    public void lb() {
        wey weyVar = new wey(this.fm, this.f7380lb, this.yz, this.ajl, this.wsy) { // from class: com.bytedance.sdk.openadsdk.core.yz.lb.1
            @Override // com.bytedance.sdk.openadsdk.core.vt.sds
            public jnr.fm lb(int i10) {
                return lb.this.fm(super.lb(i10));
            }
        };
        this.ro = weyVar;
        com.bytedance.sdk.openadsdk.core.fhx.ro.lb videoController = weyVar.getVideoController();
        if (videoController != null) {
            videoController.yz(this.f7375ef);
        }
        addView(this.ro, new ViewGroup.LayoutParams(-1, -1));
        PAGBannerAdWrapperListener pAGBannerAdWrapperListener = this.jnr;
        if (pAGBannerAdWrapperListener != null) {
            setExpressInteractionListener(pAGBannerAdWrapperListener);
        }
        sds sdsVar = this.ro;
        if (sdsVar != null) {
            ((wey) sdsVar).setVideoAdListener(new com.bytedance.sdk.openadsdk.fm.ro.lb() { // from class: com.bytedance.sdk.openadsdk.core.yz.lb.2
                @Override // com.bytedance.sdk.openadsdk.fm.ro.lb
                public void fm(int i10, int i11) {
                }

                @Override // com.bytedance.sdk.openadsdk.fm.ro.lb
                public void lb(PAGNativeAd pAGNativeAd) {
                    if (lb.this.wu != null) {
                        lb.this.wu.fm();
                    }
                }

                @Override // com.bytedance.sdk.openadsdk.fm.ro.lb
                public void ro(PAGNativeAd pAGNativeAd) {
                }

                @Override // com.bytedance.sdk.openadsdk.fm.ro.lb
                public void fm(PAGNativeAd pAGNativeAd) {
                    if (lb.this.vt == 3) {
                        lb lbVar = lb.this;
                        lbVar.fm(lbVar.wu);
                    } else if (lb.this.vt == 2) {
                        lb.this.fm();
                    }
                }
            });
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.yz.yz
    public void yz() {
        com.bytedance.sdk.openadsdk.core.fhx.ro.lb videoController;
        sds sdsVar = this.ro;
        if ((sdsVar instanceof wey) && (videoController = ((wey) sdsVar).getVideoController()) != null) {
            this.f7375ef = videoController.mon();
        }
        super.yz();
    }

    public void fm(com.bytedance.sdk.openadsdk.fm.fm.ro roVar) {
        sds sdsVar = this.ro;
        if (sdsVar != null) {
            ((wey) sdsVar).qhl();
            this.wu = roVar;
            this.vt = 3;
        }
    }

    public void ro() {
        sds sdsVar = this.ro;
        if (sdsVar != null) {
            ((wey) sdsVar).gof();
        }
    }

    public void fm() {
        sds sdsVar = this.ro;
        if (sdsVar != null) {
            ((wey) sdsVar).irt();
            this.vt = 2;
        }
    }
}
