-- Takes an instance and overlays it on top of a parent. This is used for
-- overlaying a DevModule's DataModel-based layout on top of existing services.

local function overlay(instance: Instance, parent: Instance)
	for _, child in ipairs(instance:GetChildren()) do
		local existingChild = parent:FindFirstChild(child.Name)

		if existingChild and child.ClassName == "Folder" then
			overlay(child, existingChild)
		else
			move(child, parent)
		end
	end
end
