function FlagSettings.ThrottleUserId(Z,H)assert(type(Z)=="\110\117\109\098\101\114")assert(type(H)=="\110\117\109\098\101\114")local S=H%100+1 return S<=Z end function FlagSettings.IsShareGamePageEnabledByPlatform(Z)if not FFlagSettingsHubBarsRefactor then return false end local H if Z==Enum.Platform.Windows then H=FFlagSettingsHubInviteToGameWindows elseif Z==Enum.Platform.OSX then H=FFlagSettingsHubInviteToGameOSX elseif Z==Enum.Platform.IOS then H=FFlagSettingsHubInviteToGameIOS elseif Z==Enum.Platform.Android then H=FFlagSettingsHubInviteToGameAndroid elseif Z==Enum.Platform.UWP then H=FFlagSettingsHubInviteToGameUWP end local S=tonumber(H)if not S then return false end local w=Players.LocalPlayer.UserId return FlagSettings.ThrottleUserId(S,w)end return FlagSettings
-- Helper function to throttle based on player Id:
function FlagSettings.ThrottleUserId(throttle, userId)
	assert(type(throttle) == "number")
	assert(type(userId) == "number")

	-- Determine userRollout using last two digits of user ID:
	-- (+1 to change range from 0-99 to 1-100 as 0 is off, 100 is full on):
	local userRollout = (userId % 100) + 1
	return userRollout <= throttle
end

function FlagSettings.IsShareGamePageEnabledByPlatform(platform)
	if not FFlagSettingsHubBarsRefactor then
		return false
	end

	local throttle
	if platform == Enum.Platform.Windows then
		throttle = FFlagSettingsHubInviteToGameWindows
	elseif platform == Enum.Platform.OSX then
		throttle = FFlagSettingsHubInviteToGameOSX
	elseif platform == Enum.Platform.IOS then
		throttle = FFlagSettingsHubInviteToGameIOS
	elseif platform == Enum.Platform.Android then
		throttle = FFlagSettingsHubInviteToGameAndroid
	elseif platform == Enum.Platform.UWP then
		throttle = FFlagSettingsHubInviteToGameUWP
	end

	local throttleNumber = tonumber(throttle)
	if not throttleNumber then
		return false
	end

	local userId = Players.LocalPlayer.UserId
	return FlagSettings.ThrottleUserId(throttleNumber, userId)
end

return FlagSettings
