local a={}a.ClassName="\084\101\109\112\108\097\116\101\080\114\111\118\105\100\101\114"a.__index=a function a.new(L)local I=setmetatable({},a)I._getParentAsync=L or error("\078\111 \103\101\116\080\097\114\101\110\116\065\115\121\110\099")return I end function a.Get(L,a)assert(type(a)=="\115\116\114\105\110\103","\116\101\109\112\108\097\116\101\078\097\109\101 \109\117\115\116 \098\101 \097 \115\116\114\105\110\103")return(L._getParentAsync()):WaitForChild(a)end function a.Clone(L,a)local I=(L:Get(a)):Clone()if a:sub(-8)=="\084\101\109\112\108\097\116\101"then I.Name=a:sub(1,-9)end return I end return a
--- Base of a template retrieval system
-- @classmod TemplateProvider

local TemplateProvider = {}
TemplateProvider.ClassName = "TemplateProvider"
TemplateProvider.__index = TemplateProvider

function TemplateProvider.new(getParentAsync)
	local self = setmetatable({}, TemplateProvider)

	self._getParentAsync = getParentAsync or error("No getParentAsync")

	return self
end

function TemplateProvider:Get(templateName)
	assert(type(templateName) == "string", "templateName must be a string")

	return self._getParentAsync():WaitForChild(templateName)
end

function TemplateProvider:Clone(templateName)
	local item = self:Get(templateName):Clone()
	if templateName:sub(-#("Template")) == "Template" then
		item.Name = templateName:sub(1, -#("Template") - 1)
	end
	return item
end

return TemplateProvider