-- << LOCAL FUNCTIONS >>

local function getTargetProp(item)
	if item:IsA("Frame") then
		return("BackgroundTransparency")
	elseif item:IsA("TextLabel") then
		return("TextTransparency")
	elseif item:IsA("ImageLabel") then
		return("ImageTransparency")
	end
end

local function displayMessages(items, targetTransparency, waitTime)
	for _, item in pairs(items) do
		local tt = targetTransparency
		if item:IsA("Frame") and tt < 0.35 then
			tt = 0.35
		end
		local props = {[getTargetProp(item)] = tt}
		main.tweenService:Create(item, TweenInfo.new(waitTime), props):Play()
	end
	wait(waitTime)
end

local function getMessageAppearOrder(message)
	return
		{
		{message.Bg};
		{message.Title, message.SubTitle, message.Pic};
		{message.Desc};
		};
end


