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

using Platform101XP.Entities;

namespace Platform101XP.Platforms
{
    public class StubPlatform : IPlatform
    {
        public Token GetToken()
        {
            Debug.Log("Stub: call GetToken()");
            return null;
        }

        public Account GetAccount()
        {
            Debug.Log("Stub: call GetAccount()");
            return null;
        }

        public Product GetProduct(string productId)
        {
            Debug.Log("Stub: call GetProduct(" + productId + ")");
            return null;
        }

        public void Initialize()
        {
            Debug.Log("Stub: call Initialize()");
        }

        public void ShowTroublesDialog()
        {
            Debug.Log("Stub: call ShowTroublesDialog()");
        }

        public void ApplicationInvite()
        {
            Debug.Log("Stub: call ApplicationInvite()");
        }

        public void ForcedApplicationReview()
        {
            Debug.Log("Stub: call ForcedApplicationReview()");
        }

        public void ApplicationReview()
        {
            Debug.Log("Stub: call ApplicationReview()");
        }

        public void Authorize()
        {
            Debug.Log("Stub: call Authorize()");
        }

        public void GetSocialFriends()
        {
            Debug.Log("Stub: call GetSocialFriends()");
        }

        public void LogEvent(string message)
        {
            Debug.Log("Stub: call LogEvent(" + message + ")");
        }

        public void PurchaseProduct(string productId, string serverId, Dictionary<string, string> properties)
        {
            Debug.Log("Stub: call PurchaseProduct(" + productId + "," + serverId + "," + properties + ")");
        }

        public void SendEventToAnalytic(string eventName, Dictionary<string, string> eventProperties)
        {
            Debug.Log("Stub: call SendEventToAnalytic(" + eventName + "," + eventProperties + ")");
        }

        public void SendInviteLink(string eventName)
        {
            Debug.Log("Stub: call SendInviteLink(" + eventName + ")");
        }

        public void ShowMessage(string message)
        {
            Debug.Log("Stub: call ShowMessage(" + message + ")");
        }

        public void ShowProfile()
        {
            Debug.Log("Stub: call ShowProfile()");
        }

        public void FinishPurchase(PurchaseResult purchaseResult)
        {
            Debug.Log("Stub: call FinishPurchase(" + purchaseResult + ")");
        }

        public void RestoreProducts()
        {
            Debug.Log("Stub: call RestoreProducts()");
        }

        public void PrefetchProduct(string productId)
        {
            Debug.Log("Stub: call PrefetchProduct(" + productId + ")");
        }

        public void GetProducts(List<string> productIds)
        {
            Debug.Log($"Stub: call GetProducts({productIds})");
        }

        public void CrashLog(string tag, string text)
        {
            Debug.Log("Stub: call CrashLog(" + tag + "," + text + ")");
        }

        public void ShowWebStore(Dictionary<string, string> purchaseProperties, List<string> allowedLocale)
        {
            Debug.Log("Stub: call ShowWebStore(" + purchaseProperties + ", " + allowedLocale + ")");
        }

        public void CheckMobilePurchase(string itemName)
        {
            Debug.Log("Stub: call CheckMobilePurchase(" + itemName + ")");
        }

        public void TrackSentryEvent(string eventName, Dictionary<string, object> values)
        {
            Debug.Log("Stub: call CheckMobilePurchase(" + eventName + ")");
        }

        public void TrackSentryException(Exception exception)
        {
            Debug.Log("Stub: call CheckMobilePurchase(" + exception.GetType().FullName + ")");
        }

        // MARK: - Advertising

        public void LoadRewardedAd(string id)
        {
            Debug.Log("Stub: call LoadRewardedAd(" + id + ")");
        }

        public void ShowRewardedAd()
        {
            Debug.Log("Stub: call ShowRewardedAd()");
        }

        public bool IsRewardedVideoLoaded()
        {
            Debug.Log("Stub: call IsRewardedVideoLoaded()");
            return false;
        }



        public void LoadInterstitialAd(string id)
        {
            Debug.Log("Stub: call LoadInterstitialAd(" + id + ")");
        }

        public void ShowInterstitialAd()
        {
            Debug.Log("Stub: call ShowInterstitialAd()");
        }

        public bool IsInterstitialAdLoaded()
        {
            Debug.Log("Stub: call IsInterstitialAdLoaded()");
            return false;
        }



        public void LoadBannerAd(string id)
        {
            Debug.Log("Stub: call LoadBannerAd(" + id + ")");
        }

        public void ShowBannerAd()
        {
            Debug.Log("Stub: call ShowBannerAd()");
        }

        public void HideBannerAd()
        {
            Debug.Log("Stub: call HideBannerAd()");
        }

        public bool IsBannerAdLoaded()
        {
            Debug.Log("Stub: call IsBannerAdLoaded()");
            return false;
        }



        public void ShowRewardedInterstitialAd()
        {
            Debug.Log("Stub: call ShowRewardedInterstitialAd()");
        }

        public void ResetConsentInformation()
        {
            Debug.Log("Stub: call ResetConsentInformation()");
        }



        public void LoadRewardedInterstitialAd(string id)
        {
            Debug.Log("Stub: call LoadRewardedInterstitialAd(" + id + ")");
        }
    }
}