using System;
using System.Threading.Tasks;
using Unity.Services.Mediation.Platform;
using UnityEngine;
namespace Unity.Services.Mediation
{
///
/// Class to be instantiated in order to show a Banner Ad.
///
public sealed class BannerAd : IBannerAd
{
///
/// Event to be triggered by the adapter when an Ad is loaded.
///
public event EventHandler OnLoaded;
///
/// Event to be triggered by the adapter when an Ad fails to load.
///
public event EventHandler OnFailedLoad;
///
/// Event to be triggered by the adapter when the user clicks on the Ad.
///
public event EventHandler OnClicked;
///
/// Event to be triggered by the adapter when the Ad refreshes
///
public event EventHandler OnRefreshed;
///
/// Get the current state of the ad.
///
public AdState AdState => m_BannerAdImpl.AdState;
///
/// Get the ad unit id set during construction.
///
public string AdUnitId => m_BannerAdImpl.AdUnitId;
///
/// Get the banner size set during construction.
///
public BannerAdSize Size => m_BannerAdImpl.Size;
IPlatformBannerAd m_BannerAdImpl;
TaskCompletionSource