client=nil service=nil local z=script.Parent.Components.AdonisModernComponents local y=z.Parent.Packages local C=require(y.Maid)local v=require(y.Signal)local x=require(y.Roact)local W=x.createElement local c=require(z.FadeInOutAnimationWrapper)local V=require(z.Hint)return function(z)local y=C.new()local h=v.new()local m=v.new()y.FadeInSignal=h y.FadeOutSignal=m local L=W("\083\099\114\101\101\110\071\117\105",{DisplayOrder=z.DisplayOrder or 100,IgnoreGuiInset=true,ZIndexBehavior=Enum.ZIndexBehavior.Sibling},{AnimationContainer=W(c,{FadeInSignal=h;FadeOutSignal=m,FadeInVelocity=3;FadeOutVelocity=4,OnFadeOutCompleted=function()y:Destroy()end},{Hint=W(V,{BodyText=z.Message;Image=z.Image,TitleText=z.Title})})})local U=x.mount(L,service.UnWrap(service.PlayerGui),"\065\100\111\110\105\115\085\073\046\072\105\110\116")y.RemoveHandle=function()U=x.unmount(U)end h:Fire()if z.Time then task.wait(z.Time)else task.wait((("\037\115\037\115"):format(z.Message or"",z.Title or"")):len()/19+2.5)end m:Fire()end
client = nil
service = nil

local Components = script.Parent.Components.AdonisModernComponents
local Packages = Components.Parent.Packages

local Maid = require(Packages.Maid)
local Signal = require(Packages.Signal)
local Roact = require(Packages.Roact)
local new = Roact.createElement

local FadeInOutAnimationWrapper = require(Components.FadeInOutAnimationWrapper)
local Hint = require(Components.Hint)

return function(Data)
	local AppMaid = Maid.new()
	local FadeInSignal = Signal.new()
	local FadeOutSignal = Signal.new()

	AppMaid.FadeInSignal = FadeInSignal
	AppMaid.FadeOutSignal = FadeOutSignal

	-- ////////// Create Message App
	local App = new("ScreenGui", {
		DisplayOrder = Data.DisplayOrder or 100,
		IgnoreGuiInset = true,
		ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
	}, {

		AnimationContainer = new(FadeInOutAnimationWrapper, {
			FadeInSignal = FadeInSignal,
			FadeOutSignal = FadeOutSignal,
			FadeInVelocity = 3,
			FadeOutVelocity = 4,
			OnFadeOutCompleted = function()
				AppMaid:Destroy()
			end,
		}, {

			Hint = new(Hint, {
				BodyText = Data.Message,
				Image = Data.Image,
				TitleText = Data.Title,
			}),
		}),
	})

	-- ////////// Perform Animation Tasks

	local Handle = Roact.mount(App, service.UnWrap(service.PlayerGui), "AdonisUI.Hint")

	AppMaid.RemoveHandle = function()
		Handle = Roact.unmount(Handle)
	end

	FadeInSignal:Fire()

	if Data.Time then
		task.wait(Data.Time)
	else
		-- Estimated read time
		task.wait((("%s%s"):format(Data.Message or "", Data.Title or ""):len() / 19) + 2.5)
	end

	FadeOutSignal:Fire()
end