-- Decompiled with the Synapse X Luau decompiler.


client = nil;
cPcall = nil;
Pcall = nil;
Routine = nil;
service = nil;
GetEnv = nil;
gTable = nil;
return function(p1)
	local l__PlayerGui__1 = service.PlayerGui;
	local l__LocalPlayer__2 = service.Players.LocalPlayer;
	local l__Parent__3 = script.Parent.Parent;
	local l__Frame__4 = l__Parent__3:WaitForChild("Frame");
	local l__Main__5 = l__Frame__4:WaitForChild("Main");
	local l__Close__6 = l__Frame__4:WaitForChild("Close");
	local l__Timer__7 = l__Frame__4:WaitForChild("Timer");
	local v8 = p1.OnClick;
	local v9 = p1.OnClose;
	local v10 = p1.OnIgnore;
	local l__Title__11 = p1.Title;
	local v12 = p1.Message or (p1.Text or "");
	local v13 = p1.Time;
	local v14 = p1.Icon or client.MatIcons.Info;
	if v8 and type(v8) == "string" then
		v8 = client.Core.LoadCode(v8, GetEnv());
	end;
	if v9 and type(v9) == "string" then
		v9 = client.Core.LoadCode(v9, GetEnv());
	end;
	if v10 and type(v10) == "string" then
		v10 = client.Core.LoadCode(v10, GetEnv());
	end;
	local v15 = client.UI.Get("NotificationHolder", nil, true);
	if not v15 then
		client.UI.Make("NotificationHolder");
		v15 = client.UI.Get("NotificationHolder", nil, true);
		v15.Object.ScrollingFrame.Active = false;
	end;
	l__Frame__4:WaitForChild("Title").Text = l__Title__11;
	l__Main__5.Text = v12;
	l__Frame__4:WaitForChild("Icon").Image = v14;
	local v16 = {
		Type = "Notification", 
		Title = l__Title__11, 
		Message = v12, 
		Icon = v14 and 0, 
		Time = os.date("%X"), 
		Function = v8
	};
	table.insert(client.Variables.CommunicationsHistory, v16);
	service.Events.CommsCenter:Fire(v16);
	l__Main__5.MouseButton1Click:Connect(function()
		if l__Parent__3 and l__Parent__3.Parent then
			if v8 then
				v8();
			end;
			l__Parent__3:Destroy();
		end;
	end);
	local l__gTable__1 = p1.gTable;
	l__Close__6.MouseButton1Click:Connect(function()
		if l__Parent__3 and l__Parent__3.Parent then
			if v9 then
				v9();
			end;
			l__gTable__1:Destroy();
		end;
	end);
	l__Parent__3.Parent = v15.Object.ScrollingFrame;
	task.spawn(function()
		local v17 = Instance.new("Sound", service.LocalContainer());
		v17.SoundId = "rbxassetid://203785584";
		v17.Volume = 0.2;
		v17:Play();
		wait(0.5);
		v17:Destroy();
	end);
	if v13 then
		l__Timer__7.Visible = true;
		while true do
			l__Timer__7.Text = v13;
			wait(1);
			v13 = v13 - 1;
			if v13 <= 0 then
				break;
			end;
			if not l__Parent__3 then
				break;
			end;
			if not l__Parent__3.Parent then
				break;
			end;		
		end;
		if l__Parent__3 and l__Parent__3.Parent then
			if l__Parent__3 then
				l__Parent__3:Destroy();
			end;
			if v10 then
				v10();
			end;
		end;
	end;
	return nil;
end;
