﻿using UnityEngine;
using LicenseSpring;

namespace LicenseSpring
{
    public class License : MonoBehaviour
    {
        #region Declaration

        [HideInInspector]
        public ExtendedOptions extendedOptions;

        [HideInInspector]
        public Configuration licenseConfiguration;

        [HideInInspector]
        public ILicenseManager licenseManager;

        [HideInInspector]
        public ILicense license;
        
        public ProductDetails productDetails => licenseManager?.GetProductDetails();

        #endregion
        
        public void InitializeSDK()
        {
            licenseManager = LicenseManager.GetInstance();
            licenseManager.Initialize(licenseConfiguration);

            license = licenseManager.CurrentLicense();


            Debug.Log("Initialization succeeded!");
        }
    }
}