package com.bytedance.sdk.openadsdk.component.lb;

import com.bytedance.sdk.component.utils.wey;
import com.bytedance.sdk.openadsdk.api.interstitial.PAGInterstitialAdInteractionListener;
import com.bytedance.sdk.openadsdk.core.model.lse;
import com.bytedance.sdk.openadsdk.yz.vt;
import java.util.concurrent.atomic.AtomicBoolean;

/* JADX INFO: loaded from: classes2.dex */
public class fm implements com.bytedance.sdk.openadsdk.fm.lb.ro {
    private final PAGInterstitialAdInteractionListener fm;
    private final lse yz;
    private final AtomicBoolean ro = new AtomicBoolean(false);

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private final AtomicBoolean f6885lb = new AtomicBoolean(false);

    public fm(PAGInterstitialAdInteractionListener pAGInterstitialAdInteractionListener, com.bytedance.sdk.openadsdk.core.model.fm fmVar) {
        this.fm = pAGInterstitialAdInteractionListener;
        this.yz = fmVar != null ? fmVar.wsy() : null;
    }

    @Override // com.bytedance.sdk.openadsdk.fm.lb.ro
    public void fm() {
        if (!this.ro.compareAndSet(false, true)) {
            vt.fm("show_callback_repeat", this.f6885lb.get(), this.ro.get(), this.yz);
            return;
        }
        vt.fm("show_callback", this.f6885lb.get(), this.ro.get(), this.yz);
        wey.fm("BVA", "full video onAdShow");
        PAGInterstitialAdInteractionListener pAGInterstitialAdInteractionListener = this.fm;
        if (pAGInterstitialAdInteractionListener != null) {
            pAGInterstitialAdInteractionListener.onAdShowed();
        }
    }

    @Override // com.bytedance.sdk.openadsdk.api.PAGAdWrapperListener
    public void onAdClicked() {
        PAGInterstitialAdInteractionListener pAGInterstitialAdInteractionListener = this.fm;
        if (pAGInterstitialAdInteractionListener != null) {
            pAGInterstitialAdInteractionListener.onAdClicked();
        }
    }

    @Override // com.bytedance.sdk.openadsdk.fm.lb.ro
    public void ro() {
        if (!this.f6885lb.compareAndSet(false, true)) {
            vt.fm("close_callback_repeat", this.f6885lb.get(), this.ro.get(), this.yz);
            return;
        }
        vt.fm("close_callback", this.f6885lb.get(), this.ro.get(), this.yz);
        wey.fm("BVA", "full video onAdClose");
        PAGInterstitialAdInteractionListener pAGInterstitialAdInteractionListener = this.fm;
        if (pAGInterstitialAdInteractionListener != null) {
            pAGInterstitialAdInteractionListener.onAdDismissed();
        }
    }
}
