package com.bytedance.sdk.openadsdk.component;

import com.bytedance.sdk.component.utils.wey;
import com.bytedance.sdk.openadsdk.api.open.PAGAppOpenAdInteractionListener;
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 jnr implements com.bytedance.sdk.openadsdk.fm.yz.ro {
    private final lse fm;
    private final PAGAppOpenAdInteractionListener ro;

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

    public jnr(PAGAppOpenAdInteractionListener pAGAppOpenAdInteractionListener, lse lseVar) {
        this.fm = lseVar;
        this.ro = pAGAppOpenAdInteractionListener;
    }

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

    @Override // com.bytedance.sdk.openadsdk.fm.yz.ro
    public void lb() {
        if (this.f6879lb.getAndSet(true)) {
            vt.fm("close_callback_repeat", this.f6879lb.get(), this.yz.get(), this.fm);
            return;
        }
        vt.fm("close_callback", this.f6879lb.get(), this.yz.get(), this.fm);
        PAGAppOpenAdInteractionListener pAGAppOpenAdInteractionListener = this.ro;
        if (pAGAppOpenAdInteractionListener != null) {
            pAGAppOpenAdInteractionListener.onAdDismissed();
        }
    }

    @Override // com.bytedance.sdk.openadsdk.api.PAGAdWrapperListener
    public void onAdClicked() {
        wey.fm("BVA", "onAdClicked");
        PAGAppOpenAdInteractionListener pAGAppOpenAdInteractionListener = this.ro;
        if (pAGAppOpenAdInteractionListener != null) {
            pAGAppOpenAdInteractionListener.onAdClicked();
        }
    }

    @Override // com.bytedance.sdk.openadsdk.fm.yz.ro
    public void ro() {
        wey.fm("BVA", "onAdSkip");
        if (this.f6879lb.getAndSet(true)) {
            vt.fm("close_callback_repeat", this.f6879lb.get(), this.yz.get(), this.fm);
            return;
        }
        vt.fm("close_callback", this.f6879lb.get(), this.yz.get(), this.fm);
        PAGAppOpenAdInteractionListener pAGAppOpenAdInteractionListener = this.ro;
        if (pAGAppOpenAdInteractionListener != null) {
            pAGAppOpenAdInteractionListener.onAdDismissed();
        }
    }
}
