#nullable enable
using System;
using System.Collections.Generic;

namespace IGP.UnitySDK
{
    internal static class IGPReservedMessageTypes
    {
        private static readonly HashSet<string> ReservedTypes = new HashSet<string>(
            new[]
            {
                "ping",
                "state_set",
                "state_get",
                "state_reset",
                "rpc_register",
                "rpc_unregister",
                "rpc_call",
                "kcp_token_request",
            },
            StringComparer.OrdinalIgnoreCase);

        public static bool IsReserved(string? messageType)
        {
            return !string.IsNullOrWhiteSpace(messageType) && ReservedTypes.Contains(messageType);
        }
    }
}
