using Touka.GameLogic;
using System.Collections.Generic;
using System;
using UnityEngine;

public partial class ToukaSDKManager : ToukaSingletonMonoBehaviour<ToukaSDKManager>
{
    /// <summary>
    /// 初始化统计相关SDK，游戏启动调用
    /// </summary>
    public void initAnalytics()
    {
        // 最开始你想需要初始化的逻辑
        ToukaLogicManager.Instance.Init();

        // 统计sdk初始化
        ToukaAnalyticsManager.Instance.Init();

        // 推送初始化
        if (StaticOtherConfig.LocalNotitcifaction_Switch)
        {
            LocalNotificationManager.Instance.Init();
        }

        // 排行榜功能
        if (StaticOtherConfig.LeaderBoard_Switch)
        {
            LeaderBoards.Instance.init();
        }

    }

    #region LOG EVENT

    #region Umeng event

    /// <summary>
    /// LogEventByUmeng with event name
    /// </summary>
    /// <param name="_eventSort"></param>
    public void LogEventByUmeng(string _eventSort)
    {
        ToukaAnalyticsManager.Instance.LogEventByUmeng(_eventSort);
    }

    /// <summary>
    /// LogEventByUmeng with one key-value
    /// </summary>
    /// <param name="_eventSort"></param>
    /// <param name="_key"></param>
    /// <param name="_value"></param>
    public void LogEventByUmeng(string _eventSort, string _key, string _value)
    {
        ToukaAnalyticsManager.Instance.LogEventByUmeng(_eventSort, _key, _value);
    }

    /// <summary>
    /// LogEventByUmeng with two key-value
    /// </summary>
    /// <param name="_eventSort"></param>
    /// <param name="_key01"></param>
    /// <param name="_value01"></param>
    /// <param name="_key02"></param>
    /// <param name="_value02"></param>
    public void LogEventByUmeng(string _eventSort, string _key01, string _value01, string _key02, string _value02)
    {
        ToukaAnalyticsManager.Instance.LogEventByUmeng(_eventSort, _key01, _value01, _key02, _value02);
    }

    /// <summary>
    /// LogEventByUmeng with key-value dic
    /// </summary>
    /// <param name="_eventSort"></param>
    /// <param name="_eventDic"></param>
    public void LogEventByUmeng(string _eventSort, Dictionary<string, string> _eventDic = null)
    {
        ToukaAnalyticsManager.Instance.LogEventByUmeng(_eventSort, _eventDic);
    }

    /// <summary>
    /// LogEventByUmengAdShow
    /// </summary>
    /// <param name="_adShow">event name</param>
    public void LogEventByUmengAdShow(string _adShow)
    {
        ToukaAnalyticsManager.Instance.LogEventByUmengAdShow(_adShow);
    }

    #endregion

    #region Tenjin

    /// <summary>
    /// LogEventByTenjin
    /// </summary>
    /// <param name="_eventName"></param>
    public void LogEventByTenjin(string _eventName)
    {
        ToukaAnalyticsManager.Instance.LogEvent(ToukaLogType.Tenjin, _eventName);
    }

    #endregion

    #endregion
}