#nullable enable
using System;

namespace IGP.UnitySDK
{
    [Serializable]
    public sealed class IGPConnectionChangedEvent
    {
        public bool IsConnected { get; }
        public string Source { get; }
        public string Reason { get; }

        public IGPConnectionChangedEvent(bool isConnected, string source, string reason)
        {
            IsConnected = isConnected;
            Source = source ?? string.Empty;
            Reason = reason ?? string.Empty;
        }
    }

    [Serializable]
    public sealed class IGPAuthorizationChangedEvent
    {
        public IGPAuthorizationState State { get; }
        public bool IsRequired { get; }
        public string Message { get; }

        public IGPAuthorizationChangedEvent(
            IGPAuthorizationState state,
            bool isRequired,
            string message)
        {
            State = state;
            IsRequired = isRequired;
            Message = message ?? string.Empty;
        }
    }
}
