﻿#if UNITY_IOS
namespace Stove.StoveSDK
{
    using System.Runtime.InteropServices;

    public class ViewInterface
    {

        [DllImport("__Internal")]
        private static extern void stove_view_fetchPopup(string identifier);
        internal static void FetchPopup(string identifier)
        {
            stove_view_fetchPopup(identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_fetchPopupWithLocation(int location, string identifier);
        internal static void FetchPopup(int location, string identifier)
        {
            stove_view_fetchPopupWithLocation(location, identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_fetchNews(string identifier);
        internal static void FetchNews(string identifier)
        {
            stove_view_fetchNews(identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_useCoupon(string code, string identifier);
        internal static void UseCoupon(string code, string identifier)
        {
            stove_view_useCoupon(code, identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_news(string identifier);
        internal static void News(string identifier)
        {
            stove_view_news(identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_customerSupport(string identifier);
        internal static void CustomerSupport(string identifier)
        {
            stove_view_customerSupport(identifier);
        }

        internal static void Coupon(string identifier)
        {

        }

        [DllImport("__Internal")]
        private static extern void stove_view_popup(string identifier);
        internal static void Popup(string identifier)
        {
            stove_view_popup(identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_popupWithLocation(int location, string identifier);
        internal static void Popup(int location, string identifier)
        {
            stove_view_popupWithLocation(location, identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_community(string identifier);
        internal static void Community(string identifier)
        {
            stove_view_community(identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_community_url(string url, string identifier);
        internal static void Community(string url, string identifier)
        {
            stove_view_community_url(url, identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_load(string viewRequest, string identifier);
        internal static void Load(string viewRequest, string identifier)
        {
            stove_view_load(viewRequest, identifier);
        }

        [DllImport("__Internal")]
        private static extern void stove_view_openExternalUrl(string redirectUrl, string identifier);
        internal static void OpenExternalUrl(string redirectUrl, string identifier)
        {
            stove_view_openExternalUrl(redirectUrl, identifier);
        }

        [DllImport("__Internal")]
        private static extern string stove_view_version();
        internal static string GetVersion()
        {
            return stove_view_version();
        }
    }
}

#endif