local l=require(script.Formatter)local w=require(script.Parent.Strict)local function U(w,...)return((l.new()):Write(w,...)):AsString()end local function b(w,...)return((l.new()):Write(w,...)):AsTuple()end local function o(l,w)return setmetatable({},{__FmtDebug=function(U,...)return w(l,...)end,__tostring=function()return tostring(l)end})end return w({Debugify=o,Format=U;Formatter=l,Output=b},function(l,...)return U(...)end,script.Name)
local Formatter = require(script.Formatter)
local Strict = require(script.Parent.Strict)

local function Format(Template, ...)
	return Formatter.new():Write(Template, ...):AsString()
end

local function Output(Template, ...)
	return Formatter.new():Write(Template, ...):AsTuple()
end

-- Wrap the given object in a type that implements the given function as its
-- Debug implementation, and forwards __tostring to the type's underlying
-- tostring implementation.
local function Debugify(Object, FmtFunction)
	return setmetatable({}, {
		__FmtDebug = function(_, ...)
			return FmtFunction(Object, ...)
		end;

		__tostring = function()
			return tostring(Object)
		end;
	})
end

return Strict({
	Debugify = Debugify;
	Format = Format;
	Formatter = Formatter;
	Output = Output;
}, function(_, ...)
	return Format(...)
end, script.Name)
