local Y=require(script.Parent.Symbol)local E=require(script.Parent.strict)local k=require(script.Parent.Portal)local L=newproxy(true)local n={Portal=Y.named("\080\111\114\116\097\108");Host=Y.named("\072\111\115\116");Function=Y.named("\070\117\110\099\116\105\111\110");Stateful=Y.named("\083\116\097\116\101\102\117\108")}function n.of(Y)if typeof(Y)~="\116\097\098\108\101"then return nil end return Y[L]end local s={string=n.Host;["\102\117\110\099\116\105\111\110"]=n.Function;table=n.Stateful}function n.fromComponent(Y)if Y==k then return L.Portal else return s[typeof(Y)]end end;(getmetatable(L)).__index=n E(n,"\069\108\101\109\101\110\116\075\105\110\100")return L


local Symbol = require(script.Parent.Symbol)
local strict = require(script.Parent.strict)
local Portal = require(script.Parent.Portal)

local ElementKind = newproxy(true)

local ElementKindInternal = {
	Portal = Symbol.named("Portal"),
	Host = Symbol.named("Host"),
	Function = Symbol.named("Function"),
	Stateful = Symbol.named("Stateful"),
}

function ElementKindInternal.of(value)
	if typeof(value) ~= "table" then
		return nil
	end

	return value[ElementKind]
end

local componentTypesToKinds = {
	["string"] = ElementKindInternal.Host,
	["function"] = ElementKindInternal.Function,
	["table"] = ElementKindInternal.Stateful,
}

function ElementKindInternal.fromComponent(component)
	if component == Portal then
		return ElementKind.Portal
	else
		return componentTypesToKinds[typeof(component)]
	end
end

getmetatable(ElementKind).__index = ElementKindInternal

strict(ElementKindInternal, "ElementKind")

return ElementKind
