--[[
	
	Quicker (and limited) way to use TweenService since the default synax takes up a paragraph. Supports tuple of instances.
	
	Functions.FastTween(
		instance,				<-- |REQ| 	Instance that will be tweened
		{property = 300},		<-- |REQ|	Dictionary of properties and their values 			
		{speed, style, dir}		<-- |REQ|	Array: Speed (sec), Style (str), Direction (str)	[defaults to: {1, "Sine", "InOut"}]
	)
	
--]]




return function(_entity, tweenGoals, tweenInfoRaw)
	--- Allow for multipule instances
	if type(_entity) ~= "table" then  _entity = {_entity}  end
	
	--- Variables
	local tweens = {}
	
	--- iterate through each instance
	for _, entity in ipairs(_entity) do
		if tweenInfoRaw == nil then
			--- No tweenInfo provided. Use the default one!
			tweenInfoRaw = {
				1,
				Enum.EasingStyle.Linear,
				Enum.EasingDirection.Out,
			}
		else
			--- Check (2nd) tween arguments and fix/fill them
			if tweenInfoRaw[2] == nil then
				--- No easing style provided. Use default one!
				tweenInfoRaw[2] = Enum.EasingStyle.Sine
				
			elseif type(tweenInfoRaw[2]) == "string" then
				--- Easing style provided string not enum. Convert!
				tweenInfoRaw[2] = Enum.EasingStyle[tweenInfoRaw[2]]
			end
			
			--- Check (3rd) tween arguments and fix/fill them
			if tweenInfoRaw[3] == nil then
				--- No easing direction provided. Use default one!
				tweenInfoRaw[3] = Enum.EasingDirection.InOut
				
			elseif type(tweenInfoRaw[3]) == "string" then
				--- Easing direction provided string not enum. Convert!
				tweenInfoRaw[3] = Enum.EasingDirection[tweenInfoRaw[3]]
			end
		end

		--- Create tween
		local tweenInfo = TweenInfo.new(unpack(tweenInfoRaw))
		local tweenGoals = tweenGoals
		local tween = _L.Services.TweenService:Create(entity, tweenInfo, tweenGoals)
		
		--- Play tween
		tween:Play()
		
		--- Add tween to list of tweens that will be returned
		table.insert(tweens, tween)
	end

	--
	return unpack(tweens)
end
