-- Decompiled with the Synapse X Luau decompiler.

client = nil;
service = nil;
return function(p1)
	local u1 = nil;
	local u2 = {};
	local function v1(p2, p3, p4, p5, p6, p7)
		print(p5);
		local v2 = {
			Size = UDim2.new(1, 0, 0, 50), 
			BackgroundTransparency = 1, 
			AutomaticSize = "Y"
		};
		local v3 = {};
		local v4 = {
			ClassName = "Frame", 
			Name = "LoggedItem", 
			Size = UDim2.new(1, -10, 1, -10), 
			Position = UDim2.new(0, 5, 0, 5), 
			BackgroundTransparency = 0.5, 
			AutomaticSize = "Y"
		};
		local v5 = {};
		local v6 = {
			ClassName = "TextButton", 
			Name = "Function", 
			Size = UDim2.new(1, -55, 0, 15), 
			Position = UDim2.new(0, 55, 0, 30)
		};
		if p7 then
			local v7 = "Clickable";
		else
			v7 = "Not clickable";
		end;
		v6.Text = v7;
		v6.TextSize = "14";
		v6.TextXAlignment = "Right";
		v6.BackgroundTransparency = 1;
		v6.OnClick = p7;
		v5[1] = {
			ClassName = "ImageButton", 
			Name = "Icon", 
			Size = UDim2.new(0, 48, 0, 48), 
			Position = UDim2.new(0, 1, 0, 1), 
			Image = p5, 
			OnClick = p7, 
			BackgroundTransparency = 1
		};
		v5[2] = {
			ClassName = "TextButton", 
			Name = "Title", 
			Size = UDim2.new(1, -55, 0, 15), 
			Position = UDim2.new(0, 55, 0, 0), 
			Text = p3, 
			TextSize = "14", 
			TextXAlignment = "Left", 
			BackgroundTransparency = 1, 
			OnClick = p7
		};
		v5[3] = {
			ClassName = "TextButton", 
			Name = "Type", 
			Size = UDim2.new(1, -55, 0, 15), 
			Position = UDim2.new(0, 55, 0, 0), 
			Text = p2, 
			TextSize = "14", 
			TextXAlignment = "Right", 
			BackgroundTransparency = 1, 
			OnClick = p7
		};
		v5[4] = {
			ClassName = "TextButton", 
			Name = "Time", 
			Size = UDim2.new(1, -55, 0, 15), 
			Position = UDim2.new(0, 55, 0, 15), 
			Text = p6, 
			TextSize = "14", 
			TextXAlignment = "Right", 
			BackgroundTransparency = 1, 
			OnClick = p7
		};
		v5[5] = v6;
		v5[6] = {
			ClassName = "TextButton", 
			Name = "Message", 
			Size = UDim2.new(1, -55, 0, 10), 
			Position = UDim2.new(0, 55, 0, 15), 
			Text = p4, 
			TextXAlignment = "Left", 
			TextYAlignment = "Top", 
			AutomaticSize = "Y", 
			TextWrapped = true, 
			TextScaled = false, 
			RichText = true, 
			BackgroundTransparency = 1, 
			OnClick = p7
		};
		v4.Children = v5;
		v3[1] = v4;
		v2.Children = v3;
		table.insert(u2, (u1:Add("Frame", v2)));
		if #u2 > 200 then
			u2[1]:Destroy();
			table.remove(u2, 1);
		end;
	end;
	local v8, v9 = xpcall(function()
		return service.LocalizationService:GetCountryRegionForPlayerAsync(service.Players.LocalPlayer) == "US";
	end, function()
		return false;
	end);
	local v10 = {
		Name = "CommunicationsCenter"
	};
	if v9 then
		local v11 = "Communications Center";
	else
		v11 = "Communications Center";
	end;
	v10.Title = v11;
	v10.Icon = client.MatIcons.Forum;
	v10.Size = { 500, 300 };
	function v10.OnClose()
		client.Variables.CommsCenterBindableEvent = nil;
	end;
	local v12 = client.UI.Make("Window", v10);
	u1 = v12:Add("ScrollingFrame", {
		Size = UDim2.new(1, 0, 1, 0), 
		Position = UDim2.new(0, 0, 0, 0), 
		CanvasSize = UDim2.new(0, 0, 0, 0), 
		BackgroundTransparency = 0.9
	});
	local v13 = service.New("UIListLayout", {
		Parent = u1, 
		FillDirection = "Vertical", 
		HorizontalAlignment = "Left", 
		VerticalAlignment = "Bottom", 
		SortOrder = "LayoutOrder"
	});
	v13:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
		u1.CanvasSize = UDim2.new(0, 0, 0, v13.AbsoluteContentSize.Y);
		u1.CanvasPosition = Vector2.new(0, v13.AbsoluteContentSize.Y);
	end);
	if client.Variables.CommunicationsHistory then
		for v14, v15 in ipairs(client.Variables.CommunicationsHistory) do
			v1(v15.Type, v15.Title, v15.Message, v15.Icon, v15.Time, v15.Function);
		end;
	end;
	service.HookEvent("CommsCenter", function(p8)
		v1(p8.Type, p8.Title, p8.Message, p8.Icon, p8.Time, p8.Function);
	end);
	local l__gTable__16 = v12.gTable;
	v12:Ready();
end;