using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace AD.VosacoSDK
{
    public class VosacoRewardAdListenerProxy : AndroidJavaProxy
    {
        public event Action OnLoaded;
        public event Action OnLoadFailed;
        public event Action OnClicked;
        public event Action OnReward;
        public event Action OnClose;
        public event Action OnVideoStart;
        public event Action OnVideoEnd;
        public event Action OnVideoError;

        public VosacoRewardAdListenerProxy()
            : base("com.rixengine.unity_plugin.IRewardListener")
        {

        }

        public void onLoaded()
        {
            VosacoAdSDK.LogD($"UNITY Reward Call : onLoaded");
            OnLoaded?.Invoke();
        }

        public void onLoadFailed()
        {
            VosacoAdSDK.LogD($"UNITY Reward Call : onLoadFailed");
            OnLoadFailed?.Invoke();
        }

        public void onRewardPlayStart()
        {
            VosacoAdSDK.LogD($"UNITY Reward Call : onRewardPlayStart");
            OnVideoStart?.Invoke();
        }

        public void onRewardPlayEnd()
        {
            VosacoAdSDK.LogD($"UNITY Reward Call : onRewardPlayEnd");
            OnVideoEnd?.Invoke();
        }

        public void onRewardPlayFailed()
        {
            VosacoAdSDK.LogD($"UNITY Reward Call : onRewardPlayFailed");
            OnVideoError?.Invoke();
        }

        public void onRewardClosed()
        {
            VosacoAdSDK.LogD($"UNITY Reward Call : onRewardClosed");
            OnClose?.Invoke();
        }

        public void onRewardClicked()
        {
            VosacoAdSDK.LogD($"UNITY Reward Call : onRewardClicked");
            OnClicked?.Invoke();
        }

        public void onReward()
        {
            VosacoAdSDK.LogD($"UNITY Reward Call : onReward");
            OnReward?.Invoke();
        }
    }
}
