local e=require(script.Parent.Parent.Packages.t)local J=require(script.Parent.Parent.Packages.Roact)local B=J.Component:extend("\079\110\082\111\111\116\101\100\076\105\115\116\101\110\101\114")B.validateProps=e.strictInterface({onRooted=e.callback})function B.init(e)e.onAncestryChanged=function(J)if J:IsDescendantOf(game)then e.props.onRooted(J)end end end function B.render(e)return J.createElement("\070\111\108\100\101\114",{[J.Event.AncestryChanged]=e.onAncestryChanged})end return B


local t = require(script.Parent.Parent.Packages.t)
local Roact = require(script.Parent.Parent.Packages.Roact)

local OnRootedListener = Roact.Component:extend("OnRootedListener")

OnRootedListener.validateProps = t.strictInterface({
	onRooted = t.callback,
})

function OnRootedListener:init()
	self.onAncestryChanged = function(instance)
		if instance:IsDescendantOf(game) then
			self.props.onRooted(instance)
		end
	end
end

function OnRootedListener:render()
	return Roact.createElement("Folder", {
		[Roact.Event.AncestryChanged] = self.onAncestryChanged,
	})
end

return OnRootedListener
