--strict
-- this script was generated by nightcycle/pseudo-enum, do not manually edit

export type SoundType =
	"hero_simple_celebration_02"
	| "navigation_cancel"
	| "ui_tap_variant_03"
	| "alert_error_03"
	| "notification_ambient"
	| "state_change_confirm_up"
	| "ringtone_minimal"
	| "hero_decorative_celebration_01"
	| "navigation_transition_right"
	| "hero_decorative_celebration_02"
	| "alert_simple"
	| "ui_loading"
	| "notification_decorative_01"
	| "notification_high_intensity"
	| "navigation_backward_selection_minimal"
	| "navigation_unavailable_selection"
	| "ui_unlock"
	| "notification_decorative_02"
	| "navigation_hover_tap"
	| "ui_tap_variant_01"
	| "ui_tap_variant_04"
	| "ui_tap_variant_02"
	| "alert_error_02"
	| "alarm_gentle"
	| "ui_refresh_feed"
	| "hero_simple_celebration_01"
	| "hero_decorative_celebration_03"
	| "hero_simple_celebration_03"
	| "alert_high_intensity"
	| "state_change_confirm_down"
	| "navigation_transition_left"
	| "notification_simple_01"
	| "navigation_forward_selection"
	| "navigation_selection_complete_celebration"
	| "ui_camera_shutter"
	| "navigation_forward_selection_minimal"
	| "notification_simple_02"
	| "navigation_backward_selection"
	| "ui_lock"
	| "alert_error_01"

local SoundTypeList = {
	"hero_simple_celebration_02",
	"navigation_cancel",
	"ui_tap_variant_03",
	"alert_error_03",
	"notification_ambient",
	"state_change_confirm_up",
	"ringtone_minimal",
	"hero_decorative_celebration_01",
	"navigation_transition_right",
	"hero_decorative_celebration_02",
	"alert_simple",
	"ui_loading",
	"notification_decorative_01",
	"notification_high_intensity",
	"navigation_backward_selection_minimal",
	"navigation_unavailable_selection",
	"ui_unlock",
	"notification_decorative_02",
	"navigation_hover_tap",
	"ui_tap_variant_01",
	"ui_tap_variant_04",
	"ui_tap_variant_02",
	"alert_error_02",
	"alarm_gentle",
	"ui_refresh_feed",
	"hero_simple_celebration_01",
	"hero_decorative_celebration_03",
	"hero_simple_celebration_03",
	"alert_high_intensity",
	"state_change_confirm_down",
	"navigation_transition_left",
	"notification_simple_01",
	"navigation_forward_selection",
	"navigation_selection_complete_celebration",
	"ui_camera_shutter",
	"navigation_forward_selection_minimal",
	"notification_simple_02",
	"navigation_backward_selection",
	"ui_lock",
	"alert_error_01",
}

export type FontType =
	"DisplayLarge"
	| "DisplayMedium"
	| "DisplaySmall"
	| "HeadlineLarge"
	| "HeadlineMedium"
	| "HeadlineSmall"
	| "TitleLarge"
	| "TitleMedium"
	| "TitleSmall"
	| "BodyLarge"
	| "BodyMedium"
	| "BodySmall"
	| "LabelLarge"
	| "LabelMedium"
	| "LabelSmall"

local FontTypeList = {
	"DisplayLarge",
	"DisplayMedium",
	"DisplaySmall",
	"HeadlineLarge",
	"HeadlineMedium",
	"HeadlineSmall",
	"TitleLarge",
	"TitleMedium",
	"TitleSmall",
	"BodyLarge",
	"BodyMedium",
	"BodySmall",
	"LabelLarge",
	"LabelMedium",
	"LabelSmall",
}

export type ButtonStateType = "Enabled" | "Disabled" | "Hovered" | "Focused" | "Pressed"

local ButtonStateTypeList = { "Enabled", "Disabled", "Hovered", "Focused", "Pressed" }

export type SchemeType = "Light" | "Dark"

local SchemeTypeList = { "Light", "Dark" }

export type CustomColorType = "Custom" | "OnCustom" | "CustomContainer" | "OnCustomContainer"

local CustomColorTypeList = { "Custom", "OnCustom", "CustomContainer", "OnCustomContainer" }

export type SelectionState = "Selected" | "Unselected"

local SelectionStateList = { "Selected", "Unselected" }

export type ColorRoleType =
	"Primary"
	| "OnPrimary"
	| "PrimaryContainer"
	| "OnPrimaryContainer"
	| "Secondary"
	| "OnSecondary"
	| "SecondaryContainer"
	| "OnSecondaryContainer"
	| "Tertiary"
	| "OnTertiary"
	| "TertiaryContainer"
	| "OnTertiaryContainer"
	| "Error"
	| "OnError"
	| "ErrorContainer"
	| "OnErrorContainer"
	| "Background"
	| "OnBackground"
	| "Surface"
	| "OnSurface"
	| "SurfaceVariant"
	| "OnSurfaceVariant"
	| "Outline"
	| "OutlineVariant"
	| "Shadow"
	| "Scrim"
	| "InverseSurface"
	| "InverseOnSurface"
	| "InversePrimary"
	| "SurfaceDim"
	| "SurfaceBright"
	| "SurfaceContainerLowest"
	| "SurfaceContainerLow"
	| "SurfaceContainer"
	| "SurfaceContainerHigh"
	| "SurfaceContainerHighest"
	| "SurfaceTint"

local ColorRoleTypeList = {
	"Primary",
	"OnPrimary",
	"PrimaryContainer",
	"OnPrimaryContainer",
	"Secondary",
	"OnSecondary",
	"SecondaryContainer",
	"OnSecondaryContainer",
	"Tertiary",
	"OnTertiary",
	"TertiaryContainer",
	"OnTertiaryContainer",
	"Error",
	"OnError",
	"ErrorContainer",
	"OnErrorContainer",
	"Background",
	"OnBackground",
	"Surface",
	"OnSurface",
	"SurfaceVariant",
	"OnSurfaceVariant",
	"Outline",
	"OutlineVariant",
	"Shadow",
	"Scrim",
	"InverseSurface",
	"InverseOnSurface",
	"InversePrimary",
	"SurfaceDim",
	"SurfaceBright",
	"SurfaceContainerLowest",
	"SurfaceContainerLow",
	"SurfaceContainer",
	"SurfaceContainerHigh",
	"SurfaceContainerHighest",
	"SurfaceTint",
}

export type PaletteType = "Primary" | "Secondary" | "Tertiary" | "Neutral" | "NeutralVariant" | "Error"

local PaletteTypeList = { "Primary", "Secondary", "Tertiary", "Neutral", "NeutralVariant", "Error" }

export type TransitionType =
	"Emphasized"
	| "EmphasizedDecelerate"
	| "EmphasizedAccelerate"
	| "Standard"
	| "StandardDecelerate"
	| "StandardAccelerate"

local TransitionTypeList = {
	"Emphasized",
	"EmphasizedDecelerate",
	"EmphasizedAccelerate",
	"Standard",
	"StandardDecelerate",
	"StandardAccelerate",
}

export type TransitionDuration =
	"Short1"
	| "Short2"
	| "Short3"
	| "Short4"
	| "Medium1"
	| "Medium2"
	| "Medium3"
	| "Medium4"
	| "Long1"
	| "Long2"
	| "Long3"
	| "Long4"
	| "ExtraLong1"
	| "ExtraLong2"
	| "ExtraLong3"
	| "ExtraLong4"

local TransitionDurationList = {
	"Short1",
	"Short2",
	"Short3",
	"Short4",
	"Medium1",
	"Medium2",
	"Medium3",
	"Medium4",
	"Long1",
	"Long2",
	"Long3",
	"Long4",
	"ExtraLong1",
	"ExtraLong2",
	"ExtraLong3",
	"ExtraLong4",
}
export type EnumName =
	"SoundType"
	| "FontType"
	| "ButtonStateType"
	| "SchemeType"
	| "CustomColorType"
	| "SelectionState"
	| "ColorRoleType"
	| "PaletteType"
	| "TransitionType"
	| "TransitionDuration"
return {
	getEnumItems = function(enumName: EnumName): { [number]: string }
		if enumName == "SoundType" then
			return table.clone(SoundTypeList)
		elseif enumName == "FontType" then
			return table.clone(FontTypeList)
		elseif enumName == "ButtonStateType" then
			return table.clone(ButtonStateTypeList)
		elseif enumName == "SchemeType" then
			return table.clone(SchemeTypeList)
		elseif enumName == "CustomColorType" then
			return table.clone(CustomColorTypeList)
		elseif enumName == "SelectionState" then
			return table.clone(SelectionStateList)
		elseif enumName == "ColorRoleType" then
			return table.clone(ColorRoleTypeList)
		elseif enumName == "PaletteType" then
			return table.clone(PaletteTypeList)
		elseif enumName == "TransitionType" then
			return table.clone(TransitionTypeList)
		elseif enumName == "TransitionDuration" then
			return table.clone(TransitionDurationList)
		end
		error("bad enum name: " .. tostring(enumName))
	end,
	getEnumItemFromValue = function(enumName: EnumName, value: number): string
		if enumName == "SoundType" then
			if SoundTypeList[value] then
				return SoundTypeList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "FontType" then
			if FontTypeList[value] then
				return FontTypeList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "ButtonStateType" then
			if ButtonStateTypeList[value] then
				return ButtonStateTypeList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "SchemeType" then
			if SchemeTypeList[value] then
				return SchemeTypeList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "CustomColorType" then
			if CustomColorTypeList[value] then
				return CustomColorTypeList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "SelectionState" then
			if SelectionStateList[value] then
				return SelectionStateList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "ColorRoleType" then
			if ColorRoleTypeList[value] then
				return ColorRoleTypeList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "PaletteType" then
			if PaletteTypeList[value] then
				return PaletteTypeList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "TransitionType" then
			if TransitionTypeList[value] then
				return TransitionTypeList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		elseif enumName == "TransitionDuration" then
			if TransitionDurationList[value] then
				return TransitionDurationList[value]
			else
				error("no enum item of value " .. tostring(value) .. " in enum " .. tostring(enumName))
			end
		end
		error("bad enum name: " .. tostring(enumName))
	end,

	getValueFromEnumItem = function(enumName: EnumName, enumItem: string): number
		if enumName == "SoundType" then
			local index = table.find(SoundTypeList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in SoundType")
			end
		elseif enumName == "FontType" then
			local index = table.find(FontTypeList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in FontType")
			end
		elseif enumName == "ButtonStateType" then
			local index = table.find(ButtonStateTypeList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in ButtonStateType")
			end
		elseif enumName == "SchemeType" then
			local index = table.find(SchemeTypeList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in SchemeType")
			end
		elseif enumName == "CustomColorType" then
			local index = table.find(CustomColorTypeList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in CustomColorType")
			end
		elseif enumName == "SelectionState" then
			local index = table.find(SelectionStateList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in SelectionState")
			end
		elseif enumName == "ColorRoleType" then
			local index = table.find(ColorRoleTypeList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in ColorRoleType")
			end
		elseif enumName == "PaletteType" then
			local index = table.find(PaletteTypeList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in PaletteType")
			end
		elseif enumName == "TransitionType" then
			local index = table.find(TransitionTypeList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in TransitionType")
			end
		elseif enumName == "TransitionDuration" then
			local index = table.find(TransitionDurationList, enumItem)
			if index then
				assert(index)
				return index
			else
				error("no enumItem " .. enumItem .. " in TransitionDuration")
			end
		end
		error("bad enum name: " .. tostring(enumName))
	end,
	SoundType = {
		["hero_simple_celebration_02"] = "hero_simple_celebration_02",
		["navigation_cancel"] = "navigation_cancel",
		["ui_tap_variant_03"] = "ui_tap_variant_03",
		["alert_error_03"] = "alert_error_03",
		["notification_ambient"] = "notification_ambient",
		["state_change_confirm_up"] = "state_change_confirm_up",
		["ringtone_minimal"] = "ringtone_minimal",
		["hero_decorative_celebration_01"] = "hero_decorative_celebration_01",
		["navigation_transition_right"] = "navigation_transition_right",
		["hero_decorative_celebration_02"] = "hero_decorative_celebration_02",
		["alert_simple"] = "alert_simple",
		["ui_loading"] = "ui_loading",
		["notification_decorative_01"] = "notification_decorative_01",
		["notification_high_intensity"] = "notification_high_intensity",
		["navigation_backward_selection_minimal"] = "navigation_backward_selection_minimal",
		["navigation_unavailable_selection"] = "navigation_unavailable_selection",
		["ui_unlock"] = "ui_unlock",
		["notification_decorative_02"] = "notification_decorative_02",
		["navigation_hover_tap"] = "navigation_hover_tap",
		["ui_tap_variant_01"] = "ui_tap_variant_01",
		["ui_tap_variant_04"] = "ui_tap_variant_04",
		["ui_tap_variant_02"] = "ui_tap_variant_02",
		["alert_error_02"] = "alert_error_02",
		["alarm_gentle"] = "alarm_gentle",
		["ui_refresh_feed"] = "ui_refresh_feed",
		["hero_simple_celebration_01"] = "hero_simple_celebration_01",
		["hero_decorative_celebration_03"] = "hero_decorative_celebration_03",
		["hero_simple_celebration_03"] = "hero_simple_celebration_03",
		["alert_high_intensity"] = "alert_high_intensity",
		["state_change_confirm_down"] = "state_change_confirm_down",
		["navigation_transition_left"] = "navigation_transition_left",
		["notification_simple_01"] = "notification_simple_01",
		["navigation_forward_selection"] = "navigation_forward_selection",
		["navigation_selection_complete_celebration"] = "navigation_selection_complete_celebration",
		["ui_camera_shutter"] = "ui_camera_shutter",
		["navigation_forward_selection_minimal"] = "navigation_forward_selection_minimal",
		["notification_simple_02"] = "notification_simple_02",
		["navigation_backward_selection"] = "navigation_backward_selection",
		["ui_lock"] = "ui_lock",
		["alert_error_01"] = "alert_error_01",
	},
	FontType = {
		["DisplayLarge"] = "DisplayLarge",
		["DisplayMedium"] = "DisplayMedium",
		["DisplaySmall"] = "DisplaySmall",
		["HeadlineLarge"] = "HeadlineLarge",
		["HeadlineMedium"] = "HeadlineMedium",
		["HeadlineSmall"] = "HeadlineSmall",
		["TitleLarge"] = "TitleLarge",
		["TitleMedium"] = "TitleMedium",
		["TitleSmall"] = "TitleSmall",
		["BodyLarge"] = "BodyLarge",
		["BodyMedium"] = "BodyMedium",
		["BodySmall"] = "BodySmall",
		["LabelLarge"] = "LabelLarge",
		["LabelMedium"] = "LabelMedium",
		["LabelSmall"] = "LabelSmall",
	},
	ButtonStateType = {
		["Enabled"] = "Enabled",
		["Disabled"] = "Disabled",
		["Hovered"] = "Hovered",
		["Focused"] = "Focused",
		["Pressed"] = "Pressed",
	},
	SchemeType = {
		["Light"] = "Light",
		["Dark"] = "Dark",
	},
	CustomColorType = {
		["Custom"] = "Custom",
		["OnCustom"] = "OnCustom",
		["CustomContainer"] = "CustomContainer",
		["OnCustomContainer"] = "OnCustomContainer",
	},
	SelectionState = {
		["Selected"] = "Selected",
		["Unselected"] = "Unselected",
	},
	ColorRoleType = {
		["Primary"] = "Primary",
		["OnPrimary"] = "OnPrimary",
		["PrimaryContainer"] = "PrimaryContainer",
		["OnPrimaryContainer"] = "OnPrimaryContainer",
		["Secondary"] = "Secondary",
		["OnSecondary"] = "OnSecondary",
		["SecondaryContainer"] = "SecondaryContainer",
		["OnSecondaryContainer"] = "OnSecondaryContainer",
		["Tertiary"] = "Tertiary",
		["OnTertiary"] = "OnTertiary",
		["TertiaryContainer"] = "TertiaryContainer",
		["OnTertiaryContainer"] = "OnTertiaryContainer",
		["Error"] = "Error",
		["OnError"] = "OnError",
		["ErrorContainer"] = "ErrorContainer",
		["OnErrorContainer"] = "OnErrorContainer",
		["Background"] = "Background",
		["OnBackground"] = "OnBackground",
		["Surface"] = "Surface",
		["OnSurface"] = "OnSurface",
		["SurfaceVariant"] = "SurfaceVariant",
		["OnSurfaceVariant"] = "OnSurfaceVariant",
		["Outline"] = "Outline",
		["OutlineVariant"] = "OutlineVariant",
		["Shadow"] = "Shadow",
		["Scrim"] = "Scrim",
		["InverseSurface"] = "InverseSurface",
		["InverseOnSurface"] = "InverseOnSurface",
		["InversePrimary"] = "InversePrimary",
		["SurfaceDim"] = "SurfaceDim",
		["SurfaceBright"] = "SurfaceBright",
		["SurfaceContainerLowest"] = "SurfaceContainerLowest",
		["SurfaceContainerLow"] = "SurfaceContainerLow",
		["SurfaceContainer"] = "SurfaceContainer",
		["SurfaceContainerHigh"] = "SurfaceContainerHigh",
		["SurfaceContainerHighest"] = "SurfaceContainerHighest",
		["SurfaceTint"] = "SurfaceTint",
	},
	PaletteType = {
		["Primary"] = "Primary",
		["Secondary"] = "Secondary",
		["Tertiary"] = "Tertiary",
		["Neutral"] = "Neutral",
		["NeutralVariant"] = "NeutralVariant",
		["Error"] = "Error",
	},
	TransitionType = {
		["Emphasized"] = "Emphasized",
		["EmphasizedDecelerate"] = "EmphasizedDecelerate",
		["EmphasizedAccelerate"] = "EmphasizedAccelerate",
		["Standard"] = "Standard",
		["StandardDecelerate"] = "StandardDecelerate",
		["StandardAccelerate"] = "StandardAccelerate",
	},
	TransitionDuration = {
		["Short1"] = "Short1",
		["Short2"] = "Short2",
		["Short3"] = "Short3",
		["Short4"] = "Short4",
		["Medium1"] = "Medium1",
		["Medium2"] = "Medium2",
		["Medium3"] = "Medium3",
		["Medium4"] = "Medium4",
		["Long1"] = "Long1",
		["Long2"] = "Long2",
		["Long3"] = "Long3",
		["Long4"] = "Long4",
		["ExtraLong1"] = "ExtraLong1",
		["ExtraLong2"] = "ExtraLong2",
		["ExtraLong3"] = "ExtraLong3",
		["ExtraLong4"] = "ExtraLong4",
	},
}


--!strict
local _Package = script.Parent
local _Packages = _Package.Parent
-- Services
local SoundService = game:GetService("SoundService")
-- Packages
-- Modules
local Enums = require(_Package:WaitForChild("Enums"))
-- Types
-- Constants
local LIBRARY: { [Enums.SoundType]: string } = table.freeze({
	hero_simple_celebration_02 = "rbxassetid://15530172366",
	navigation_cancel = "rbxassetid://15530082510",
	ui_tap_variant_03 = "rbxassetid://15530107510",
	alert_error_03 = "rbxassetid://15530081806",
	notification_ambient = "rbxassetid://15530133360",
	state_change_confirm_up = "rbxassetid://15530106459",
	ringtone_minimal = "rbxassetid://15530133688",
	hero_decorative_celebration_01 = "rbxassetid://15530172572",
	navigation_transition_right = "rbxassetid://15530082646",
	hero_decorative_celebration_02 = "rbxassetid://15530172198",
	alert_simple = "rbxassetid://15530134380",
	ui_loading = "rbxassetid://15530081925",
	notification_decorative_01 = "rbxassetid://15530134178",
	notification_high_intensity = "rbxassetid://15530133039",
	navigation_backward_selection_minimal = "rbxassetid://15530108245",
	navigation_unavailable_selection = "rbxassetid://15530082211",
	ui_unlock = "rbxassetid://15530107328",
	notification_decorative_02 = "rbxassetid://15530133501",
	navigation_hover_tap = "rbxassetid://15530107661",
	ui_tap_variant_01 = "rbxassetid://15530106592",
	ui_tap_variant_04 = "rbxassetid://15530106152",
	ui_tap_variant_02 = "rbxassetid://15530106800",
	alert_error_02 = "rbxassetid://15530082354",
	alarm_gentle = "rbxassetid://15530134666",
	ui_refresh_feed = "rbxassetid://15530081643",
	hero_simple_celebration_01 = "rbxassetid://15530172024",
	hero_decorative_celebration_03 = "rbxassetid://15530172766",
	hero_simple_celebration_03 = "rbxassetid://15530172475",
	alert_high_intensity = "rbxassetid://15530134780",
	state_change_confirm_down = "rbxassetid://15530107943",
	navigation_transition_left = "rbxassetid://15530082066",
	notification_simple_01 = "rbxassetid://15530133936",
	navigation_forward_selection = "rbxassetid://15530108068",
	navigation_selection_complete_celebration = "rbxassetid://15530107202",
	ui_camera_shutter = "rbxassetid://15530106289",
	navigation_forward_selection_minimal = "rbxassetid://15530107049",
	notification_simple_02 = "rbxassetid://15530133223",
	navigation_backward_selection = "rbxassetid://15530108417",
	ui_lock = "rbxassetid://15530107845",
	alert_error_01 = "rbxassetid://15530082764",
})
-- Variables
-- References
-- Private Functions
-- Class

return {
	play = function(soundType: Enums.SoundType, volume: number)
		local sound = Instance.new("Sound")
		sound.SoundId = LIBRARY[soundType]
		sound.Volume = volume
		SoundService:PlayLocalSound(sound)
		sound:Destroy()
	end,
	Library = LIBRARY,
}


--!strict
local _Package = script.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local HashUtil = require(_Packages:WaitForChild("HashUtil"))

-- Modules
local Typography = require(_Package:WaitForChild("Typography"))
local Theme = require(_Package:WaitForChild("Theme"))
local Enums = require(_Package:WaitForChild("Enums"))

-- Types
export type Theme = Theme.Theme
export type Typography = Typography.Typography
export type FontData = Typography.FontData
export type Style = {
	__index: Style,
	Scale: number,
	SchemeType: Enums.SchemeType,
	_Theme: Theme,
	_Typography: Typography,
	GetElevatedColor: (self: Style, color: Color3, elevation: number) -> Color3,
	GetColor: (self: Style, role: Enums.ColorRoleType, elevation: number?) -> Color3,
	GetCustomColor: (
		self: Style,
		name: string,
		customType: Enums.CustomColorType,
		elevation: number?
	) -> Color3,
	GetFont: (self: Style, fontType: Enums.FontType) -> Font,
	GetFontData: (self: Style, fontType: Enums.FontType) -> FontData,
	GetTextSize: (self: Style, fontType: Enums.FontType) -> number,
	GetLineHeight: (self: Style, fontType: Enums.FontType) -> number,
	new: (
		scale: number,
		typographyOrFont: Typography | Enum.Font,
		schemeType: Enums.SchemeType,
		themeOrColor: Color3 | Theme
	) -> Style,
}

-- Constants
-- Variables
local Cache: { [string]: Style } = {}

-- References
-- Private Functions

-- Class
local Style = {} :: Style
Style.__index = Style

function Style:GetColor(role: Enums.ColorRoleType, elevation: number?): Color3
	return self._Theme:Get(role, self.SchemeType, elevation)
end

function Style:GetElevatedColor(color: Color3, elevation: number): Color3
	return self._Theme.getElevatedColor(color, elevation, self.SchemeType)
end

function Style:GetCustomColor(name: string, customType: Enums.CustomColorType, elevation: number?): Color3
	return self._Theme:GetCustom(name, customType, self.SchemeType, elevation)
end

function Style:GetFont(fontType: Enums.FontType): Font
	return self._Typography:Get(fontType).Font
end

function Style:GetFontData(fontType: Enums.FontType): FontData
	return table.clone(self._Typography:Get(fontType))
end

function Style:GetTextSize(fontType: Enums.FontType): number
	return Typography.getTextSize(self._Typography:Get(fontType).Size, self.Scale)
end

function Style:GetLineHeight(fontType: Enums.FontType): number
	return Typography.getGuiLineHeight(
		self._Typography:Get(fontType).LineHeight,
		self._Typography:Get(fontType).Size
	)
end

function Style.new(
	scale: number,
	typographyOrFont: Typography | Enum.Font,
	schemeType: Enums.SchemeType,
	themeOrColor: Color3 | Theme
): Style
	local typography: Typography
	if typeof(typographyOrFont) == "EnumItem" then
		typography = Typography.fromFont(typographyOrFont)
	else
		typography = typographyOrFont
	end

	local theme: Theme
	if typeof(themeOrColor) == "Color3" then
		theme = Theme.new(themeOrColor)
	else
		theme = themeOrColor
	end

	local hash = HashUtil.md5(`{scale}+{typography:Hash()}+{schemeType}+{theme:Hash()}`)
	if Cache[hash] then
		return Cache[hash]
	end

	local self: Style = setmetatable({}, Style) :: any
	self.Scale = scale
	self.SchemeType = schemeType
	self._Theme = theme
	self._Typography = typography

	table.freeze(self)
	Cache[hash] = self

	return self
end

return Style


--!strict
-- Services
-- Packages
local Maid = require(game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Maid"))
-- Modules
local Enums = require(script.Parent.Parent:WaitForChild("Enums"))
-- Types
-- Constants
-- Variables
-- References
-- Class
return function(frame: Frame)
	local maid = Maid.new()
	task.spawn(function()
		local Theme = require(script.Parent)
		local theme = Theme.new(Color3.new(0.1, 0, 0.9), {})

		local function displayScheme(palette: Enums.PaletteType): Frame
			local halfFrame = maid:GiveTask(Instance.new("Frame"))
			halfFrame.Size = UDim2.fromScale(1 / 6, 1)

			local listLayout = maid:GiveTask(Instance.new("UIListLayout"))
			listLayout.FillDirection = Enum.FillDirection.Vertical
			listLayout.Padding = UDim.new(0, 0)
			listLayout.SortOrder = Enum.SortOrder.LayoutOrder
			listLayout.VerticalAlignment = Enum.VerticalAlignment.Top
			listLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
			listLayout.Parent = halfFrame

			for i = 0, 10 do
				local label = Instance.new("TextLabel")
				label.TextColor3 = Color3.new(0.5, 0.5, 0.5)
				label.Text = `{i * 100}`
				label.BackgroundColor3 = theme.Palettes[palette](i / 10)
				label.LayoutOrder = i
				label.Size = UDim2.fromScale(1, 1 / 11)
				label.TextScaled = true
				label.Parent = halfFrame
			end

			return halfFrame
		end

		local pTypes = Enums.getEnumItems("PaletteType")
		for i, pT in ipairs(pTypes) do
			local sch = displayScheme(Enums.PaletteType.Primary)
			sch.Position = UDim2.fromScale((i - 1) / #pTypes, 0)
			sch.Parent = frame
		end
	end)
	return function()
		maid:Destroy()
	end
end


--!strict
-- Services
-- Packages
local Enums = require(script.Parent.Parent:WaitForChild("Enums"))
local Maid = require(game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Maid"))
-- Modules
-- Types
-- Constants

-- Variables
-- References
-- Class
return function(frame: Frame)
	local maid = Maid.new()
	task.spawn(function()
		local Theme = require(script.Parent)

		local function displayScheme(schemeType: Enums.SchemeType, source: Color3): Frame
			local theme = Theme.new(source)
			local scheme = theme._Schemes[schemeType]
			local halfFrame = maid:GiveTask(Instance.new("Frame"))
			halfFrame.BackgroundColor3 = theme:Get(Enums.ColorRoleType.Background, schemeType)

			local listLayout = maid:GiveTask(Instance.new("UIListLayout"))
			listLayout.FillDirection = Enum.FillDirection.Vertical
			listLayout.Padding = UDim.new(0.01, 0)
			listLayout.SortOrder = Enum.SortOrder.LayoutOrder
			listLayout.VerticalAlignment = Enum.VerticalAlignment.Top
			listLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
			listLayout.Parent = halfFrame

			for i, role in ipairs(Enums.getEnumItems("ColorRoleType")) do
				local v = scheme[role :: Enums.ColorRoleType]
				local label = Instance.new("TextLabel")
				label.TextColor3 = Color3.new(0.5, 0.5, 0.5)
				label.Text = `{role}`
				label.BackgroundColor3 = v
				label.LayoutOrder = (Enums.getValueFromEnumItem("ColorRoleType", role) * i)
					+ Enums.getValueFromEnumItem("ColorRoleType", role)
				label.Size = UDim2.fromScale(0.9, 1 / 50)
				label.TextScaled = true
				label.Parent = halfFrame
			end

			return halfFrame
		end

		local function tryColor(source: Color3): Frame
			local halfFrame = maid:GiveTask(Instance.new("Frame"))

			local light = displayScheme(Enums.SchemeType.Light, source)
			light.BackgroundColor3 = Color3.new(0.85, 0.85, 0.85)
			light.Position = UDim2.fromScale(0, 0)
			light.Size = UDim2.fromScale(0.5, 1)
			light.Parent = halfFrame

			local dark = displayScheme(Enums.SchemeType.Dark, source)
			dark.BackgroundColor3 = Color3.new(0.15, 0.15, 0.15)
			dark.Position = UDim2.fromScale(0.5, 0)
			dark.Size = UDim2.fromScale(0.5, 1)
			dark.Parent = halfFrame

			halfFrame.Parent = frame
			return halfFrame
		end

		do
			local red = tryColor(Color3.new(1, 0, 0))
			red.Size = UDim2.fromScale(1 / 3, 1)
			red.Position = UDim2.fromScale(0, 0)
		end

		do
			local green = tryColor(Color3.new(0, 1, 0))
			green.Size = UDim2.fromScale(1 / 3, 1)
			green.Position = UDim2.fromScale(1 / 3, 0)
		end

		do
			local blue = tryColor(Color3.new(0, 0, 1))
			blue.Size = UDim2.fromScale(1 / 3, 1)
			blue.Position = UDim2.fromScale(2 / 3, 0)
		end
	end)
	return function()
		maid:Destroy()
	end
end


--!strict
--!native
local _Package = script.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local HashUtil = require(_Packages:WaitForChild("HashUtil"))
local TableUtil = require(_Packages:WaitForChild("TableUtil"))

-- Modules
local ThemeUtil = require(script:WaitForChild("ThemeUtil"))
local HCT = require(script:WaitForChild("HCT"))
local Enums = require(_Package:WaitForChild("Enums"))
local Blend = require(script:WaitForChild("Blend"))

-- Types
type GoogleHCT = HCT.HCT
type GoogleCustomColor = ThemeUtil.CustomColor
type GoogleTheme = ThemeUtil.Theme
type GoogleScheme = ThemeUtil.Scheme
type GoogleTonalPalette = ThemeUtil.TonalPalette
type GoogleColorGroup = ThemeUtil.ColorGroup
export type Scheme = { [Enums.ColorRoleType]: Color3 }
export type TonalPalette = (alpha: number, noClamp: boolean?) -> Color3
export type CustomColorGroup = {
	Name: string,
	Value: number,
	IsBlended: boolean,
	Schemes: {
		[Enums.SchemeType]: { [Enums.CustomColorType]: Color3 },
	},
}
export type Theme = {
	__index: Theme,
	Source: Color3,
	_Schemes: { [Enums.SchemeType]: Scheme },
	Palettes: { [Enums.PaletteType]: TonalPalette },
	_CustomColors: {
		[string]: CustomColorGroup,
	},
	_Hash: string,
	Hash: (self: Theme) -> string,
	Get: (self: Theme, role: Enums.ColorRoleType, schemeType: Enums.SchemeType, elevation: number?) -> Color3,
	GetCustom: (
		self: Theme,
		name: string,
		customType: Enums.CustomColorType,
		schemeType: Enums.SchemeType,
		elevation: number?
	) -> Color3,
	getElevatedColor: (color: Color3, elevation: number, schemeType: Enums.SchemeType) -> Color3,
	new: (source: Color3, custom: { [string]: Color3 }?) -> Theme,
}
-- Constants
local ELEVATION_TINTS = { 0, 0.05, 0.08, 0.11, 0.12, 0.14 }
-- Variables
local Cache: { [string]: Theme } = {}
-- References
-- Private Functions

-- Class
local Theme = {} :: Theme
Theme.__index = Theme

function Theme:Hash()
	return self._Hash
end

function Theme.new(source: Color3, custom: { [string]: Color3 }?): Theme
	local hash = ""
	do
		local hashInput = `{source:ToHex()}+` .. "{"
		if custom then
			local keys = TableUtil.keys(custom)
			table.sort(keys)
			for i, k in ipairs(keys) do
				hashInput ..= `{k}={custom[k]:ToHex()},`
			end
		end
		hashInput ..= "}"
		hash = HashUtil.md5(hashInput)
	end
	if Cache[hash] then
		return Cache[hash]
	end

	local googleTheme: GoogleTheme
	do
		local customColors: { [number]: GoogleCustomColor } = {}
		if custom then
			for k, color in pairs(custom) do
				table.insert(customColors, ThemeUtil.customColor(HCT.fromColor3(source):toInt(), k, false))
			end
		end

		googleTheme = ThemeUtil.themeFromSourceColor(HCT.fromColor3(source):toInt(), customColors)
	end

	local lightScheme: Scheme
	local darkScheme: Scheme
	do
		local function fromScheme(scheme: GoogleScheme): Scheme
			return table.freeze({
				[Enums.ColorRoleType.Primary] = HCT.fromInt(scheme.primary):toColor3(),
				[Enums.ColorRoleType.OnPrimary] = HCT.fromInt(scheme.onPrimary):toColor3(),
				[Enums.ColorRoleType.PrimaryContainer] = HCT.fromInt(scheme.primaryContainer):toColor3(),
				[Enums.ColorRoleType.OnPrimaryContainer] = HCT.fromInt(scheme.onPrimaryContainer):toColor3(),
				[Enums.ColorRoleType.InversePrimary] = HCT.fromInt(scheme.inversePrimary):toColor3(),
				[Enums.ColorRoleType.Secondary] = HCT.fromInt(scheme.secondary):toColor3(),
				[Enums.ColorRoleType.OnSecondary] = HCT.fromInt(scheme.onSecondary):toColor3(),
				[Enums.ColorRoleType.SecondaryContainer] = HCT.fromInt(scheme.secondaryContainer):toColor3(),
				[Enums.ColorRoleType.OnSecondaryContainer] = HCT.fromInt(scheme.onSecondaryContainer)
					:toColor3(),
				[Enums.ColorRoleType.Tertiary] = HCT.fromInt(scheme.tertiary):toColor3(),
				[Enums.ColorRoleType.OnTertiary] = HCT.fromInt(scheme.onTertiary):toColor3(),
				[Enums.ColorRoleType.TertiaryContainer] = HCT.fromInt(scheme.tertiaryContainer):toColor3(),
				[Enums.ColorRoleType.OnTertiaryContainer] = HCT.fromInt(scheme.onTertiaryContainer)
					:toColor3(),
				[Enums.ColorRoleType.Error] = HCT.fromInt(scheme.error):toColor3(),
				[Enums.ColorRoleType.OnError] = HCT.fromInt(scheme.onError):toColor3(),
				[Enums.ColorRoleType.ErrorContainer] = HCT.fromInt(scheme.errorContainer):toColor3(),
				[Enums.ColorRoleType.OnErrorContainer] = HCT.fromInt(scheme.onErrorContainer):toColor3(),
				[Enums.ColorRoleType.Background] = HCT.fromInt(scheme.background):toColor3(),
				[Enums.ColorRoleType.OnBackground] = HCT.fromInt(scheme.onBackground):toColor3(),
				[Enums.ColorRoleType.Surface] = HCT.fromInt(scheme.surface):toColor3(),
				[Enums.ColorRoleType.OnSurface] = HCT.fromInt(scheme.onSurface):toColor3(),
				[Enums.ColorRoleType.SurfaceVariant] = HCT.fromInt(scheme.surfaceVariant):toColor3(),
				[Enums.ColorRoleType.OnSurfaceVariant] = HCT.fromInt(scheme.onSurfaceVariant):toColor3(),
				[Enums.ColorRoleType.InverseSurface] = HCT.fromInt(scheme.inverseSurface):toColor3(),
				[Enums.ColorRoleType.InverseOnSurface] = HCT.fromInt(scheme.inverseOnSurface):toColor3(),
				[Enums.ColorRoleType.SurfaceDim] = HCT.fromInt(scheme.surfaceDim):toColor3(),
				[Enums.ColorRoleType.SurfaceBright] = HCT.fromInt(scheme.surfaceBright):toColor3(),
				[Enums.ColorRoleType.SurfaceContainerLowest] = HCT.fromInt(scheme.surfaceContainerLowest)
					:toColor3(),
				[Enums.ColorRoleType.SurfaceContainerLow] = HCT.fromInt(scheme.surfaceContainerLow)
					:toColor3(),
				[Enums.ColorRoleType.SurfaceContainer] = HCT.fromInt(scheme.surfaceContainer):toColor3(),
				[Enums.ColorRoleType.SurfaceContainerHigh] = HCT.fromInt(scheme.surfaceContainerHigh)
					:toColor3(),
				[Enums.ColorRoleType.SurfaceContainerHighest] = HCT.fromInt(scheme.surfaceContainerHighest)
					:toColor3(),
				[Enums.ColorRoleType.SurfaceTint] = HCT.fromInt(scheme.surfaceTint):toColor3(),
				[Enums.ColorRoleType.Outline] = HCT.fromInt(scheme.outline):toColor3(),
				[Enums.ColorRoleType.OutlineVariant] = HCT.fromInt(scheme.outlineVariant):toColor3(),
				[Enums.ColorRoleType.Shadow] = HCT.fromInt(scheme.shadow):toColor3(),
				[Enums.ColorRoleType.Scrim] = HCT.fromInt(scheme.scrim):toColor3(),
			}) :: Scheme
		end
		lightScheme = fromScheme(googleTheme.schemes.light)
		darkScheme = fromScheme(googleTheme.schemes.dark)
	end

	local primaryPalette: TonalPalette
	local secondaryPalette: TonalPalette
	local tertiaryPalette: TonalPalette
	local neutralPalette: TonalPalette
	local neutralVariantPalette: TonalPalette
	local errorPalette: TonalPalette
	do
		local function fromPalette(tonalPalette: GoogleTonalPalette): TonalPalette
			return function(alpha: number, noClamp: boolean?): Color3
				return HCT.fromInt(
					tonalPalette:getTone(if noClamp then alpha * 100 else math.clamp(alpha, 0.05, 0.9) * 100)
				):toColor3()
			end
		end
		primaryPalette = fromPalette(googleTheme.palettes.primary)
		secondaryPalette = fromPalette(googleTheme.palettes.secondary)
		tertiaryPalette = fromPalette(googleTheme.palettes.tertiary)
		neutralPalette = fromPalette(googleTheme.palettes.neutral)
		neutralVariantPalette = fromPalette(googleTheme.palettes.neutralVariant)
		errorPalette = fromPalette(googleTheme.palettes.error)
	end

	local customColors: { [string]: CustomColorGroup } = {}
	do
		local function fromColorGroup(group: GoogleColorGroup): { [Enums.ColorRoleType]: Color3 }
			return table.freeze({
				[Enums.CustomColorType.Custom] = HCT.fromInt(group.color):toColor3(),
				[Enums.CustomColorType.OnCustom] = HCT.fromInt(group.onColor):toColor3(),
				[Enums.CustomColorType.CustomContainer] = HCT.fromInt(group.colorContainer):toColor3(),
				[Enums.CustomColorType.OnCustomContainer] = HCT.fromInt(group.onColorContainer):toColor3(),
			})
		end
		for i, colorGroup in pairs(googleTheme.customColors) do
			local cGroup: CustomColorGroup = {
				Name = colorGroup.color.name,
				Value = colorGroup.value,
				IsBlended = colorGroup.color.blend,
				Schemes = {
					Light = fromColorGroup(colorGroup.light),
					Dark = fromColorGroup(colorGroup.dark),
				},
			}
			table.freeze(cGroup)
			customColors[colorGroup.color.name] = cGroup
		end
	end

	local theme: Theme = setmetatable({
		Source = source,
		_Schemes = table.freeze({
			Light = lightScheme,
			Dark = darkScheme,
		}),
		_Hash = hash,
		Palettes = table.freeze({
			Primary = primaryPalette,
			Secondary = secondaryPalette,
			Tertiary = tertiaryPalette,
			Neutral = neutralPalette,
			NeutralVariant = neutralVariantPalette,
			Error = errorPalette,
		}),
		CustomColors = table.freeze(customColors),
	}, Theme) :: any
	table.freeze(theme)
	Cache[hash] = theme
	return theme
end

function Theme.getElevatedColor(color: Color3, elevation: number, schemeType: Enums.SchemeType): Color3
	local hct = HCT.fromColor3(color)
	local tone = hct:getTone()
	elevation += 1
	elevation = math.clamp(elevation, 1, #ELEVATION_TINTS)
	if ELEVATION_TINTS[elevation] then
		local newColor = HCT.fromColor3(color)
		newColor:setTone(tone + (tone * ELEVATION_TINTS[elevation]))
		return newColor:toColor3()
	else
		local up = math.ceil(elevation)
		local down = math.floor(elevation)

		local downColor = HCT.fromColor3(color)
		downColor:setTone(tone - (tone * ELEVATION_TINTS[down]))

		local upColor = HCT.fromColor3(color)
		upColor:setTone(tone + (tone * ELEVATION_TINTS[up]))

		return HCT.fromInt(Blend.cam16Ucs(downColor:toInt(), upColor:toInt(), (elevation - down))):toColor3()
	end
end

function Theme:GetCustom(
	name: string,
	customType: Enums.CustomColorType,
	schemeType: Enums.SchemeType,
	elevation: number?
): Color3
	local customColorGroup: CustomColorGroup = self._CustomColors[name]
	assert(customColorGroup, `no custom color group at {name}`)

	local color: Color3 = customColorGroup.Schemes[schemeType][customType]

	if elevation then
		return self.getElevatedColor(color, elevation, schemeType)
	else
		return color
	end
end

function Theme:Get(role: Enums.ColorRoleType, schemeType: Enums.SchemeType, elevation: number?): Color3
	local scheme: Scheme = self._Schemes[schemeType]

	local color: Color3 = scheme[role :: Enums.ColorRoleType]
	assert(color, `no role named {role}`)

	if elevation then
		return self.getElevatedColor(color, elevation, schemeType)
	else
		return color
	end
end

return Theme


--!strict
local _Package = script.Parent.Parent
local _Packages = _Package.Parent
-- Services
local RunService = game:GetService("RunService")
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local CurveUtil = require(_Packages:WaitForChild("CurveUtil"))

-- Modules
local Style = require(_Package:WaitForChild("Style"))
local Enums = require(_Package:WaitForChild("Enums"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
-- Constants
local PAD = 10
local IN_PAD = 2
local X_COUNT = 3
local Y_COUNT = 4
local DURATION = 0.75
-- Variables
-- References
-- Class
return function(frame: Frame)
	local maid = Maid.new()
	task.spawn(function()
		local Module = require(script.Parent)
		local style = Style.new(
			1,
			Enum.Font.SourceSans,
			Enums.SchemeType.Light,
			Color3.fromHSV(math.random(), 0.7, 0.7)
		)

		local gridLayout = maid:GiveTask(Instance.new("UIGridLayout"))
		gridLayout.CellPadding = UDim2.fromOffset(PAD, PAD)
		gridLayout.CellSize = UDim2.new(1 / X_COUNT, -PAD, 1 / Y_COUNT, -PAD)
		gridLayout.Parent = frame
		do
			local uiPadding = maid:GiveTask(Instance.new("UIPadding"))
			uiPadding.PaddingLeft = UDim.new(0, PAD)
			uiPadding.PaddingRight = UDim.new(0, PAD)
			uiPadding.PaddingTop = UDim.new(0, PAD)
			uiPadding.PaddingBottom = UDim.new(0, PAD)
			uiPadding.Parent = frame
		end

		local _fuse = ColdFusion.fuse(maid)

		local _new = _fuse.new
		local _bind = _fuse.bind
		local _clone = _fuse.clone
		local _import = _fuse.import

		local _Value = _fuse.Value
		local _Computed = _fuse.Computed

		local order = 0

		local function graphTransition(name: string, solver: (x: number) -> number)
			order += 1
			local xState = _Value(0)
			local yState = _Computed(function(x: number): number
				return solver(x)
			end, xState)

			local image = Instance.new("EditableImage")
			local out = maid:GiveTask(Instance.new("Frame"))
			out.LayoutOrder = order
			out.BackgroundColor3 = style:GetColor(Enums.ColorRoleType.Background)

			local label = _new("ImageLabel")({
				Size = UDim2.fromScale(0, 0),
				AutomaticSize = Enum.AutomaticSize.XY,
				Parent = out,
				BackgroundColor3 = style:GetColor(Enums.ColorRoleType.Surface),
				LayoutOrder = 2,
				Children = {
					image :: any,
					_new("Frame")({
						BackgroundColor3 = style:GetColor(Enums.ColorRoleType.Surface),
						BorderSizePixel = 0,
						Size = UDim2.new(1, 0, 0, 5),
						AnchorPoint = Vector2.new(0, 0.5),
						Position = _Computed(function(y: number): UDim2
							return UDim2.fromScale(0, 1 - y)
						end, yState),
					}),
				},
			}) :: ImageLabel

			local listLayout = maid:GiveTask(Instance.new("UIListLayout"))
			listLayout.FillDirection = Enum.FillDirection.Vertical
			listLayout.Padding = UDim.new(0, IN_PAD)
			listLayout.VerticalAlignment = Enum.VerticalAlignment.Top
			listLayout.HorizontalAlignment = Enum.HorizontalAlignment.Left
			listLayout.HorizontalFlex = Enum.UIFlexAlignment.Fill
			listLayout.VerticalFlex = Enum.UIFlexAlignment.Fill
			listLayout.Parent = out

			local uiPadding = maid:GiveTask(Instance.new("UIPadding"))
			uiPadding.PaddingLeft = UDim.new(0, IN_PAD)
			uiPadding.PaddingRight = UDim.new(0, IN_PAD)
			uiPadding.PaddingTop = UDim.new(0, IN_PAD)
			uiPadding.PaddingBottom = UDim.new(0, IN_PAD)
			uiPadding.Parent = out

			local text = maid:GiveTask(Instance.new("TextLabel"))
			text.AutomaticSize = Enum.AutomaticSize.X
			text.BackgroundTransparency = 1
			text.TextScaled = false
			text.TextColor3 = style:GetColor(Enums.ColorRoleType.OnBackground)
			text.TextSize = 14
			text.Size = UDim2.fromOffset(0, 14)
			text.Text = name
			text.TextXAlignment = Enum.TextXAlignment.Center
			text.LayoutOrder = 1
			text.Parent = out

			local uiAlignment = maid:GiveTask(Instance.new("UISizeConstraint"))
			uiAlignment.MaxSize = Vector2.new(math.huge, text.TextSize + IN_PAD * 2 + 4)
			uiAlignment.MinSize = Vector2.zero
			uiAlignment.Parent = text

			out.Size = UDim2.fromScale(1, 1)
			out.Parent = frame

			local index = 0
			local prevX = 0
			local start = tick()
			maid:GiveTask(RunService.RenderStepped:Connect(function()
				image.Size = label.AbsoluteSize
				local x = math.clamp(((tick() - start) % DURATION) / DURATION, 0, 1)
				if x < xState:Get() then
					-- image:DrawRectangle(
					-- 	Vector2.zero,
					-- 	label.AbsoluteSize,
					-- 	Color3.new(1,1,1),
					-- 	0
					-- )
					index += 1
					prevX = 0
				end
				local y = solver(x)

				local prevY = solver(prevX)

				local function drawSegment(offset: Vector2)
					pcall(function()
						image:DrawLine(
							Vector2.new(prevX, math.clamp(1 - prevY, 0, 1)) * image.Size + offset,
							Vector2.new(x, math.clamp(1 - y, 0, 1)) * image.Size + offset,
							if index % 2 == 0
								then style:GetColor(Enums.ColorRoleType.OnPrimary)
								else style:GetColor(Enums.ColorRoleType.OnTertiary),
							0,
							Enum.ImageCombineType.Overwrite
						)
					end)
				end
				pcall(function()
					image:DrawRectangle(
						Vector2.new(prevX, 0) * label.AbsoluteSize,
						Vector2.new((x - prevX), 1) * label.AbsoluteSize + Vector2.new(1, 0),
						-- Color3.fromHSV(
						-- 	if index % 2 == 0 then 0.25 else 0.75,
						-- 	1,
						-- 	1
						-- ),
						if index % 2 == 0
							then style:GetColor(Enums.ColorRoleType.Primary)
							else style:GetColor(Enums.ColorRoleType.Tertiary),
						0,
						Enum.ImageCombineType.Overwrite
					)
				end)

				drawSegment(Vector2.zero)
				drawSegment(Vector2.new(0, 1))
				drawSegment(Vector2.new(0, -1))
				xState:Set(x)
				prevX = x
			end))
		end
		do
			graphTransition("cubic-in", function(x: number): number
				return CurveUtil.ease(x, Enum.EasingStyle.Cubic, Enum.EasingDirection.In)
			end)
			graphTransition("cubic-out", function(x: number): number
				return CurveUtil.ease(x, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out)
			end)
			graphTransition("cubic-inout", function(x: number): number
				return CurveUtil.ease(x, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut)
			end)
		end

		do
			graphTransition("exp-in", function(x: number): number
				return CurveUtil.ease(x, Enum.EasingStyle.Exponential, Enum.EasingDirection.In)
			end)
			graphTransition("exp-out", function(x: number): number
				return CurveUtil.ease(x, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out)
			end)
			graphTransition("exp-inout", function(x: number): number
				return CurveUtil.ease(x, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut)
			end)
		end

		do
			graphTransition("emphasized", Module.Easing[Enums.TransitionType.Emphasized])

			graphTransition("emphasized-decel", Module.Easing[Enums.TransitionType.EmphasizedDecelerate])

			graphTransition("emphasized-accel", Module.Easing[Enums.TransitionType.EmphasizedAccelerate])
		end

		do
			graphTransition("standard", Module.Easing[Enums.TransitionType.Standard])

			graphTransition("standard-decel", Module.Easing[Enums.TransitionType.StandardDecelerate])

			graphTransition("standard-accel", Module.Easing[Enums.TransitionType.StandardAccelerate])
		end
	end)
	return function()
		maid:Destroy()
	end
end


--!strict
local _Package = script.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local CurveUtil = require(_Packages:WaitForChild("CurveUtil"))
-- Modules
local Enums = require(_Package:WaitForChild("Enums"))

-- Types
-- Constants
local EMP_FLIP_POINT = 0.2
local EMP_WEIGHT = 0.45
local STD_FLIP_POINT = 0.2
local STD_WEIGHT = 0.2
-- Variables
-- References
-- Private Functions
-- Class
-- Types

-- Class
local Util = {}

Util.Easing = {
	[Enums.TransitionType.Emphasized] = function(x: number): number
		if x < EMP_FLIP_POINT then
			return CurveUtil.ease(x / EMP_FLIP_POINT, Enum.EasingStyle.Exponential, Enum.EasingDirection.In)
				* EMP_WEIGHT
		else
			return EMP_WEIGHT
				+ (1 - EMP_WEIGHT)
					* CurveUtil.ease(
						(x - EMP_FLIP_POINT) / (1 - EMP_FLIP_POINT),
						Enum.EasingStyle.Exponential,
						Enum.EasingDirection.Out
					)
		end
	end,
	[Enums.TransitionType.EmphasizedDecelerate] = function(x: number): number
		return (CurveUtil.ease(x, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out) ^ 0.5)
	end,
	[Enums.TransitionType.EmphasizedAccelerate] = function(x: number): number
		return (CurveUtil.ease(x, Enum.EasingStyle.Exponential, Enum.EasingDirection.In) ^ 1.25)
	end,
	[Enums.TransitionType.Standard] = function(x: number): number
		if x < STD_FLIP_POINT then
			return CurveUtil.ease(x / STD_FLIP_POINT, Enum.EasingStyle.Cubic, Enum.EasingDirection.In)
				* STD_WEIGHT
		else
			return STD_WEIGHT
				+ (1 - STD_WEIGHT)
					* CurveUtil.ease(
						(x - STD_FLIP_POINT) / (1 - STD_FLIP_POINT),
						Enum.EasingStyle.Cubic,
						Enum.EasingDirection.Out
					)
		end
	end,
	[Enums.TransitionType.StandardAccelerate] = function(x: number): number
		return (CurveUtil.ease(x, Enum.EasingStyle.Cubic, Enum.EasingDirection.In) ^ 1.25)
	end,
	[Enums.TransitionType.StandardDecelerate] = function(x: number): number
		return (CurveUtil.ease(x, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out) ^ 0.5)
	end,
}

Util.Duration = {
	[Enums.TransitionDuration.Short1] = 50 / 1000,
	[Enums.TransitionDuration.Short2] = 100 / 1000,
	[Enums.TransitionDuration.Short3] = 150 / 1000,
	[Enums.TransitionDuration.Short4] = 200 / 1000,
	[Enums.TransitionDuration.Medium1] = 250 / 1000,
	[Enums.TransitionDuration.Medium2] = 300 / 1000,
	[Enums.TransitionDuration.Medium3] = 350 / 1000,
	[Enums.TransitionDuration.Medium4] = 400 / 1000,
	[Enums.TransitionDuration.Long1] = 450 / 1000,
	[Enums.TransitionDuration.Long2] = 500 / 1000,
	[Enums.TransitionDuration.Long3] = 550 / 1000,
	[Enums.TransitionDuration.Long4] = 600 / 1000,
	[Enums.TransitionDuration.ExtraLong1] = 700 / 1000,
	[Enums.TransitionDuration.ExtraLong2] = 800 / 1000,
	[Enums.TransitionDuration.ExtraLong3] = 900 / 1000,
	[Enums.TransitionDuration.ExtraLong4] = 1000 / 1000,
}

return Util


--!strict
--!native
local _Package = script.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Fusion = require(_Packages:WaitForChild("Fusion"))
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
-- Types
type Maid = Maid.Maid

-- CFusion
export type CFuse = ColdFusion.Fuse
export type CFusionState<V> = ColdFusion.State<V>
export type CFusionValueState<V> = ColdFusion.ValueState<V>
export type CFusionCanBeState<V> = ColdFusion.CanBeState<V>

-- Fusion
export type FusionStateObject<V> = Fusion.StateObject<V>
export type FusionCanBeState<V> = Fusion.CanBeState<V>
export type FusionValue<V> = Fusion.Value<V>
export type FusionObserver = Fusion.Observer

export type Wrapper<BaseInstance, Definition, ClassName> = Definition & BaseInstance & {
	ClassName: ClassName & string,
	Instance: BaseInstance & Instance,
}

-- Private functions

-- Interface
local Translators = {}

Translators.Fusion = {}
Translators.Wrapper = {}
Translators.ColdFusion = {}
Translators.Roact = {}

function Translators.Fusion.toColdFusion<V>(
	maid: Maid,
	fuse: CFuse,
	value: FusionCanBeState<V>,
	default: V
): CFusionCanBeState<V>
	if typeof(value) == "table" then
		local valueTable: { [unknown]: unknown? } = value :: any
		-- print("state=", valueTable["State"],  valueTable)
		if
			valueTable["type"] == "State"
			and typeof(valueTable["kind"]) == "string"
			and typeof(valueTable["get"]) == "function"
		then
			local stateObject: FusionStateObject<V> = valueTable :: any
			local state = fuse.Value(stateObject:get(false))
			local observer = Fusion.Observer(stateObject)
			maid:GiveTask(observer:onChange(function()
				local val = stateObject:get(false)
				state:Set(if val == nil then default else val)
			end))

			return state
		end
	end
	if value == nil then
		return default
	else
		return value :: any
	end
end

function Translators.ColdFusion.toWrapper<BaseInstance, Definition, ClassName>(
	className: ClassName & string,
	inst: BaseInstance & Instance,
	states: {
		[unknown]: CFusionValueState<unknown?>,
	},
	defaults: {
		[unknown]: unknown?,
	}
): (Wrapper<
	Instance,
	{ [string]: any },
	string
>, () -> ())
	--  Private class
	local wrapper = {}
	wrapper.ClassName = className
	wrapper.Instance = inst

	local meta = {}

	local function cleanUp()
		table.clear(wrapper)
		-- setmetatable(wrapper, nil)
		table.clear(meta)
	end

	function meta:Destroy()
		inst:Destroy()
		cleanUp()
	end

	function meta:__index(k: unknown): unknown?
		if rawget(self, k) then
			return rawget(self, k)
		elseif states[k] then
			return states[k]:Get()
		else
			return (inst :: any)[k]
		end
	end

	function meta:__newindex(k: unknown, v: unknown?): ()
		if rawget(self, k) ~= nil then
			rawset(self, k, v)
		elseif states[k] then
			if v == nil then
				states[k]:Set(defaults[k])
			else
				states[k]:Set(v)
			end
		elseif v ~= nil then
			local anyInst: any = inst
			anyInst[k] = v
		end
	end

	setmetatable(wrapper :: any, meta)
	table.freeze(wrapper)
	return wrapper :: any, cleanUp
end

return Translators


--!strict
-- Services
-- Packages
-- Modules
-- Types
export type AppearanceData = {
	Color3: Color3,
	Transparency: number,
}

export type ShadowData = {
	Offset: Vector2,
	Appearance: AppearanceData,
}

export type RenderData = {
	Scale: number,
	Border: AppearanceData,
	Background: AppearanceData,
	Sound: SoundData?,
	Image: ImageData?,
	Font: FontData?,
	Text: AppearanceData?,
	Shadow: ShadowData?,
}

export type ImageData = {
	Image: string,
	ImageRectOffset: Vector2,
	ImageRectSize: Vector2,
}

export type SoundData = {
	SoundId: string,
	Volume: number,
}

export type ButtonData = {
	Icon: ImageData?,
	Text: string?,
	Enabled: boolean,
	OnClick: () -> (),
}

export type OptionData = {
	Text: string,
	Icon: ImageData?,
	Disabled: boolean,
	IsInitiallySelected: boolean,
	SelectedText: string,
	SelectedIcon: ImageData?,
	OnSelect: (isSelected: boolean) -> (),
}

export type FontData = {
	Font: Font,
	Size: number,
	Tracking: number,
	LineHeight: number,
}

-- Constants
-- Variables
-- References
-- Private Functions
-- Class
local Types = {}

Types.FontData = {}
function Types.FontData.new(font: Font, size: number, lineHeight: number?, tracking: number?): FontData
	return table.freeze({
		Font = font,
		Size = size,
		Tracking = tracking or 0,
		LineHeight = lineHeight or size,
	})
end

Types.ButtonData = {}
function Types.ButtonData.new(
	onClick: () -> (),
	icon: ImageData?,
	text: string?,
	enabled: boolean?
): ButtonData
	return table.freeze({
		Icon = icon,
		Text = text,
		OnClick = onClick,
		Enabled = if enabled == nil then true else enabled,
	})
end

Types.OptionData = {}
function Types.OptionData.new(
	onSelect: (isSelected: boolean) -> (),
	disabled: boolean,
	isInitiallySelected: boolean,
	text: string?,
	icon: ImageData?,
	selectedText: string?,
	selectedIcon: ImageData?
): OptionData
	return table.freeze({
		Text = text or "",
		Icon = icon,
		Disabled = disabled,
		SelectedText = selectedText or text or "",
		SelectedIcon = selectedIcon or icon,
		IsInitiallySelected = isInitiallySelected,
		OnSelect = onSelect,
	})
end

Types._SoundData = {}
function Types._SoundData.new(soundId: string, volume: number?): SoundData
	return table.freeze({
		SoundId = soundId,
		Volume = volume or 1,
	})
end

Types._ShadowData = {}
function Types._ShadowData.new(appearance: AppearanceData, offset: Vector2): ShadowData
	return table.freeze({
		Appearance = appearance,
		Offset = offset,
	})
end

Types._AppearanceData = {}
function Types._AppearanceData.new(color3: Color3, transparency: number?): AppearanceData
	return table.freeze({
		Color3 = color3,
		Transparency = transparency or 0,
	})
end

Types.ImageData = {}
function Types.ImageData.new(image: string, rectOffset: Vector2?, rectSize: Vector2?): ImageData
	return table.freeze({
		Image = image,
		ImageRectOffset = rectOffset or Vector2.zero,
		ImageRectSize = rectSize or Vector2.zero,
	})
end

Types._RenderData = {}
function Types._RenderData.new(
	scale: number,
	border: AppearanceData,
	background: AppearanceData,
	text: AppearanceData?,
	font: FontData?,
	image: ImageData?,
	sound: SoundData?,
	shadow: ShadowData?
): RenderData
	return table.freeze({
		Scale = scale,
		Border = border,
		Background = background,
		Sound = sound,
		Image = image,
		Font = font,
		Text = text,
		Shadow = shadow,
	})
end

return Types


--!strict
local _Package = script.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local HashUtil = require(_Packages:WaitForChild("HashUtil"))
-- Modules
local Enums = require(_Package:WaitForChild("Enums"))
local Types = require(_Package:WaitForChild("Types"))

-- Types
export type FontData = Types.FontData
type TextInstance = TextLabel | TextButton | TextBox
export type Typography = {
	__index: Typography,
	_Fonts: { [Enums.FontType]: FontData },
	getTextSize: (fontSize: number, scale: number) -> number,
	getGuiLineHeight: (lineHeight: number, fontSize: number) -> number,
	apply: (inst: TextInstance, fontData: FontData, scale: number?) -> (),
	Apply: (self: Typography, inst: TextInstance, fontType: Enums.FontType, scale: number?) -> (),
	Get: (self: Typography, fontType: Enums.FontType) -> FontData,
	Hash: (self: Typography) -> string,
	new: (fonts: { [Enums.FontType]: FontData }) -> Typography,
	fromFont: (font: Enum.Font) -> Typography,
}
-- Constants
local WEIGHT = {
	[100] = Enum.FontWeight.Thin,
	[200] = Enum.FontWeight.ExtraLight,
	[300] = Enum.FontWeight.Light,
	[400] = Enum.FontWeight.Regular,
	[500] = Enum.FontWeight.Medium,
	[600] = Enum.FontWeight.SemiBold,
	[700] = Enum.FontWeight.Bold,
	[800] = Enum.FontWeight.ExtraBold,
	[900] = Enum.FontWeight.Heavy,
}
-- Variables
local FontCache: { [Enum.Font]: Typography } = {}

-- References
-- Private Functions
local function newFontFamily(font: Enum.Font, weight: Enum.FontWeight, style: Enum.FontStyle): Font
	local fontFamily = Font.fromEnum(font)
	fontFamily.Weight = weight
	fontFamily.Style = style
	return fontFamily
end

-- Class
local Typography = {} :: Typography
Typography.__index = Typography

function Typography.getTextSize(fontSize: number, scale: number): number
	return fontSize * scale
end

function Typography.getGuiLineHeight(lineHeight: number, fontSize: number): number
	return lineHeight / fontSize
end

function Typography.apply(inst: TextInstance, fontData: FontData, scale: number?)
	scale = scale or 1
	assert(scale)
	local textSize = Typography.getTextSize(fontData.Size, scale)
	local lineHeightRatio = Typography.getGuiLineHeight(fontData.LineHeight, fontData.Size)
	if inst:IsA("TextLabel") then
		inst.TextSize = textSize
		inst.LineHeight = lineHeightRatio
		inst.FontFace = fontData.Font
	elseif inst:IsA("TextButton") then
		inst.TextSize = textSize
		inst.LineHeight = lineHeightRatio
		inst.FontFace = fontData.Font
	elseif inst:IsA("TextBox") then
		inst.TextSize = textSize
		inst.LineHeight = lineHeightRatio
		inst.FontFace = fontData.Font
	else
		error(`Unsupported TextInstance type: {inst.ClassName}`)
	end
end

function Typography:Apply(inst: TextInstance, fontType: Enums.FontType, scale: number?)
	Typography.apply(inst, self:Get(fontType), scale)
end

function Typography:Get(style: Enums.FontType): FontData
	return self._Fonts[style]
end

function Typography:Hash(): string
	local fullMessage = ""
	for fontType, fontData in pairs(self._Fonts) do
		fullMessage ..= `[{fontType}-{fontData.Font}-{fontData.Size}-{fontData.Tracking}-{fontData.LineHeight}],`
	end
	return HashUtil.md5(fullMessage)
end

function Typography.new(fonts: { [Enums.FontType]: FontData }): Typography
	local self: Typography = setmetatable({}, Typography) :: any
	self._Fonts = table.freeze(table.clone(fonts))

	table.freeze(self)
	return self
end

function Typography.fromFont(font: Enum.Font): Typography
	if FontCache[font] then
		return FontCache[font]
	end

	local self = Typography.new({
		[Enums.FontType.DisplayLarge] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 57,
			Tracking = -0.25,
			LineHeight = 64,
		}),
		[Enums.FontType.DisplayMedium] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 45,
			Tracking = 0,
			LineHeight = 52,
		}),
		[Enums.FontType.DisplaySmall] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 36,
			Tracking = 0,
			LineHeight = 44,
		}),
		[Enums.FontType.HeadlineLarge] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 32,
			Tracking = 0,
			LineHeight = 40,
		}),
		[Enums.FontType.HeadlineMedium] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 28,
			Tracking = 0,
			LineHeight = 36,
		}),
		[Enums.FontType.HeadlineSmall] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 24,
			Tracking = 0,
			LineHeight = 32,
		}),
		[Enums.FontType.TitleLarge] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 22,
			Tracking = 0,
			LineHeight = 28,
		}),
		[Enums.FontType.TitleMedium] = table.freeze({
			Font = newFontFamily(font, WEIGHT[500], Enum.FontStyle.Normal),
			Size = 16,
			Tracking = 0.15,
			LineHeight = 24,
		}),
		[Enums.FontType.TitleSmall] = table.freeze({
			Font = newFontFamily(font, WEIGHT[500], Enum.FontStyle.Normal),
			Size = 14,
			Tracking = 0.1,
			LineHeight = 20,
		}),
		[Enums.FontType.BodyLarge] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 16,
			Tracking = 0.5,
			LineHeight = 24,
		}),
		[Enums.FontType.BodyMedium] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 14,
			Tracking = 0.25,
			LineHeight = 20,
		}),
		[Enums.FontType.BodySmall] = table.freeze({
			Font = newFontFamily(font, WEIGHT[400], Enum.FontStyle.Normal),
			Size = 12,
			Tracking = 0.4,
			LineHeight = 16,
		}),
		[Enums.FontType.LabelLarge] = table.freeze({
			Font = newFontFamily(font, WEIGHT[500], Enum.FontStyle.Normal),
			Size = 14,
			Tracking = 0.1,
			LineHeight = 20,
		}),
		[Enums.FontType.LabelMedium] = table.freeze({
			Font = newFontFamily(font, WEIGHT[700], Enum.FontStyle.Normal),
			Size = 12,
			Tracking = 0.5,
			LineHeight = 16,
		}),
		[Enums.FontType.LabelSmall] = table.freeze({
			Font = newFontFamily(font, WEIGHT[500], Enum.FontStyle.Normal),
			Size = 11,
			Tracking = 0.5,
			LineHeight = 16,
		}),
	})
	FontCache[font] = self

	return self
end

return Typography


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type Style = Style.Style
type ImageData = Types.ImageData
-- Constants
-- Variables
-- References
-- Private Functions
-- Class
local Util = {}

function Util.new(): Frame
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local out = _new("Frame")({
		Name = "Container",
		AutomaticSize = Enum.AutomaticSize.XY,
		Size = UDim2.fromScale(0, 0),
		BackgroundTransparency = 1,
		BorderSizePixel = 0,
	}) :: Frame

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

return Util


--!strict
return {
	ColdFusion = require(script:WaitForChild("ColdFusion")),
}


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type Style = Style.Style
type ImageData = Types.ImageData
-- Constants
-- Variables
-- References
-- Private Functions
-- Class
local Util = {}

function Util.new(
	icon: CanBeState<ImageData?>,
	color: CanBeState<Color3?>,
	transparency: CanBeState<number?>
): ImageLabel
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local iconState = _import(icon, nil :: ImageData?)
	local out = _new("ImageLabel")({
		Image = _Computed(function(i: ImageData?): string
			return if i then i.Image else ""
		end, iconState),
		ImageRectOffset = _Computed(function(i: ImageData?): Vector2
			return if i then i.ImageRectOffset else Vector2.zero
		end, iconState),
		ImageRectSize = _Computed(function(i: ImageData?): Vector2
			return if i then i.ImageRectSize else Vector2.zero
		end, iconState),
		BackgroundTransparency = 1,
		ImageColor3 = color,
		ImageTransparency = transparency,
	}) :: ImageLabel

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

return Util


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type Style = Style.Style
type ImageData = Types.ImageData
-- Constants
-- Variables
-- References
-- Private Functions
-- Class
local Util = {}

function Util.new(
	verticalAlignment: CanBeState<Enum.VerticalAlignment>,
	horizontalAlignment: CanBeState<Enum.HorizontalAlignment>,
	fillDirection: CanBeState<Enum.FillDirection>,
	listPadding: CanBeState<UDim>,
	verticalFlex: CanBeState<Enum.UIFlexAlignment>,
	horizontalFlex: CanBeState<Enum.UIFlexAlignment>,
	itemLineAlignment: CanBeState<Enum.ItemLineAlignment>,
	wraps: CanBeState<boolean>
): UIListLayout
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local out = _new("UIListLayout")({
		Padding = listPadding,
		SortOrder = Enum.SortOrder.LayoutOrder,
		FillDirection = fillDirection,
		VerticalAlignment = verticalAlignment,
		HorizontalAlignment = horizontalAlignment,
		ItemLineAlignment = itemLineAlignment,
		HorizontalFlex = horizontalFlex,
		VerticalFlex = verticalFlex,
		Wraps = wraps,
	}) :: UIListLayout

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Util.classic(
	verticalAlignment: CanBeState<Enum.VerticalAlignment>,
	horizontalAlignment: CanBeState<Enum.HorizontalAlignment>,
	fillDirection: CanBeState<Enum.FillDirection>,
	listPadding: CanBeState<UDim>
): UIListLayout
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local out = _new("UIListLayout")({
		Padding = listPadding,
		SortOrder = Enum.SortOrder.LayoutOrder,
		FillDirection = fillDirection,
		VerticalAlignment = verticalAlignment,
		HorizontalAlignment = horizontalAlignment,
		ItemLineAlignment = Enum.ItemLineAlignment.Automatic,
		HorizontalFlex = Enum.UIFlexAlignment.None,
		VerticalFlex = Enum.UIFlexAlignment.None,
		Wraps = false,
	}) :: UIListLayout

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Util.center(): UIListLayout
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local out = _new("UIListLayout")({
		Padding = UDim.new(0, 0),
		SortOrder = Enum.SortOrder.LayoutOrder,
		FillDirection = Enum.FillDirection.Vertical,
		VerticalAlignment = Enum.VerticalAlignment.Center,
		HorizontalAlignment = Enum.HorizontalAlignment.Center,
		ItemLineAlignment = Enum.ItemLineAlignment.Automatic,
		HorizontalFlex = Enum.UIFlexAlignment.None,
		VerticalFlex = Enum.UIFlexAlignment.None,
		Wraps = false,
	}) :: UIListLayout

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

return Util


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type Style = Style.Style
type ImageData = Types.ImageData
-- Constants
-- Variables
-- References
-- Private Functions
-- Class
local Util = {}

function Util.new(leftRight: CanBeState<UDim>, topBottom: CanBeState<UDim>): UIPadding
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local out = _new("UIPadding")({
		PaddingTop = topBottom,
		PaddingBottom = topBottom,
		PaddingLeft = leftRight,
		PaddingRight = leftRight,
	}) :: UIPadding

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Util.fromStyle(
	leftRightDp: CanBeState<number>,
	topBottomDp: CanBeState<number>,
	style: CanBeState<Style>
): UIPadding
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local leftRightDpState = _import(leftRightDp, 0)
	local topBottomDpState = _import(topBottomDp, 0)
	local styleState: State<Style> = _import(style, nil :: any)

	local leftRight = _Computed(function(s: Style, dp: number): UDim
		return UDim.new(0, s.Scale * dp)
	end, styleState, leftRightDpState)

	local topBottom = _Computed(function(s: Style, dp: number): UDim
		return UDim.new(0, s.Scale * dp)
	end, styleState, topBottomDpState)

	local out = _new("UIPadding")({
		PaddingTop = topBottom,
		PaddingBottom = topBottom,
		PaddingLeft = leftRight,
		PaddingRight = leftRight,
	}) :: UIPadding

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Util.fromStyleSimple(dp: CanBeState<number>, style: CanBeState<Style>): UIPadding
	return Util.fromStyle(dp, dp, style)
end

return Util


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))
local Container = require(_Package:WaitForChild("Util"):WaitForChild("Container"):WaitForChild("ColdFusion"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type Style = Style.Style
type ImageData = Types.ImageData
-- Constants
-- Variables
-- References
-- Private Functions
-- Class
local Util = {}

function Util.new(absolutePosition: CanBeState<Vector2>, anchorPoint: CanBeState<Vector2>): Frame
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local goalAbsolutePositionState: State<Vector2> = _import(absolutePosition, Vector2.new(0, 0))
	local anchorPointState: State<Vector2> = _import(anchorPoint, Vector2.zero)
	local finalPositionState: ValueState<Vector2> = _Value(goalAbsolutePositionState:Get())

	local screenGui = maid:GiveTask(_new("ScreenGui")({
		Name = "PopUpGui",
		DisplayOrder = 10000,
		Parent = if RunService:IsRunning() and Players.LocalPlayer
			then Players.LocalPlayer:WaitForChild("PlayerGui")
			else game:GetService("CoreGui"),
	})) :: Frame

	local out = _bind(Container.new())({
		Parent = screenGui,
		Position = _Computed(function(pos: Vector2): UDim2
			return UDim2.fromOffset(pos.X, pos.Y)
		end, finalPositionState),
		AnchorPoint = anchorPointState,
	}) :: Frame
	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	maid:GiveTask(RunService.RenderStepped:Connect(function(deltaTime: number)
		local viewportSize = workspace.CurrentCamera.ViewportSize
		local absSize = out.AbsoluteSize
		local goalPos = goalAbsolutePositionState:Get()
		local aPoint = anchorPointState:Get()
		local xMin = absSize.X * aPoint.X
		local yMin = absSize.Y * aPoint.Y

		local x = math.clamp(goalPos.X, xMin, math.max(xMin, viewportSize.X - absSize.X * (1 - aPoint.X)))
		local y = math.clamp(goalPos.Y, yMin, math.max(yMin, viewportSize.Y - absSize.Y * (1 - aPoint.Y)))
		finalPositionState:Set(Vector2.new(x, y))
	end))

	return out
end

function Util.fromGuiObject(
	guiObject: CanBeState<GuiObject>,
	guiObjectAnchorPoint: CanBeState<Vector2>,
	hintAnchorPoint: CanBeState<Vector2>
): Frame
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local guiObjectState: State<GuiObject> = _import(guiObject, nil :: any)
	local guiAnchorPoint: State<Vector2> = _import(guiObjectAnchorPoint, Vector2.one)

	local function getAbsolutePosition(): Vector2
		local gui = guiObjectState:Get()
		local absPosition = gui.AbsolutePosition
		local absSize = gui.AbsoluteSize
		local gAnchor = guiAnchorPoint:Get()

		return absPosition + Vector2.new(absSize.X * gAnchor.X, absSize.Y * gAnchor.Y)
	end
	local absolutePosition = _Value(getAbsolutePosition())

	local out = Util.new(absolutePosition, hintAnchorPoint)

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))
	maid:GiveTask(RunService.RenderStepped:Connect(function(deltaTime: number)
		absolutePosition:Set(getAbsolutePosition())
	end))

	return out
end

return Util


--!strict
-- Services
-- Packages
local Maid = require(game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Maid"))
local ColdFusion =
	require(game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("ColdFusion"))

-- Modules
-- Types
-- Constants
local ANCHOR_POINT_KEY = "GuiAnchorPoint"
local HINT_ANCHOR_POINT_KEY = "HintAnchorPoint"
-- Variables
-- References
-- Class
return function(frame: Frame)
	local maid = Maid.new()
	task.spawn(function()
		local Module = require(script.Parent:WaitForChild("ColdFusion"))

		local textLabel = maid:GiveTask(Instance.new("TextLabel"))
		textLabel.Size = UDim2.fromOffset(200, 50)
		textLabel.Parent = frame

		local hint = maid:GiveTask(Instance.new("TextLabel"))
		hint.Text = "Hint"
		hint.Size = UDim2.fromOffset(100, 25)
		hint.Parent = frame

		local _fuse = ColdFusion.fuse(maid)

		local _new = _fuse.new
		local _bind = _fuse.bind
		local _clone = _fuse.clone
		local _import = _fuse.import

		local _Value = _fuse.Value
		local _Computed = _fuse.Computed

		local anchorPointState = _Value(Vector2.one)
		local hintAnchorPointState = _Value(Vector2.zero)

		local container =
			maid:GiveTask(Module.fromGuiObject(textLabel, anchorPointState, hintAnchorPointState))

		container:SetAttribute(ANCHOR_POINT_KEY, anchorPointState:Get())
		maid:GiveTask(container:GetAttributeChangedSignal(ANCHOR_POINT_KEY):Connect(function()
			local anchorPoint = container:GetAttribute(ANCHOR_POINT_KEY)
			assert(typeof(anchorPoint) == "Vector2", `{ANCHOR_POINT_KEY} must be a Vector2`)
			anchorPointState:Set(anchorPoint)
		end))

		container:SetAttribute(HINT_ANCHOR_POINT_KEY, hintAnchorPointState:Get())
		maid:GiveTask(container:GetAttributeChangedSignal(HINT_ANCHOR_POINT_KEY):Connect(function()
			local hintAnchorPoint = container:GetAttribute(HINT_ANCHOR_POINT_KEY)
			assert(typeof(hintAnchorPoint) == "Vector2", `{HINT_ANCHOR_POINT_KEY} must be a Vector2`)
			hintAnchorPointState:Set(hintAnchorPoint)
		end))

		local uiLayout = maid:GiveTask(Instance.new("UIListLayout"))
		uiLayout.Parent = container
		hint.Parent = container
	end)
	return function()
		maid:Destroy()
	end
end


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type Style = Style.Style
type ImageData = Types.ImageData
-- Constants
local MID_IMAGE = "http://www.roblox.com/asset/?id=16331943650"
local TOP_IMAGE = "http://www.roblox.com/asset/?id=16331984401"
local BOTTOM_IMAGE = "http://www.roblox.com/asset/?id=16331988989"

-- Variables
-- References
-- Private Functions
-- Class
local Util = {}

function Util.new(barThickness: CanBeState<number?>, barColor: CanBeState<Color3?>): ScrollingFrame
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local barThicknessState = _import(barThickness, 10)
	local barColorState = _import(barColor, Color3.new(1, 1, 1))

	local out = _new("ScrollingFrame")({
		Name = "ScrollingContainer",
		AutomaticSize = Enum.AutomaticSize.None,
		AutomaticCanvasSize = Enum.AutomaticSize.None,
		Size = UDim2.fromScale(0, 0),
		CanvasSize = UDim2.fromScale(0, 0),
		BackgroundTransparency = 1,
		BorderSizePixel = 0,
		BottomImage = BOTTOM_IMAGE,
		TopImage = TOP_IMAGE,
		MidImage = MID_IMAGE,
		ScrollBarThickness = barThicknessState,
		ScrollBarImageColor3 = barColorState,
		VerticalScrollBarInset = Enum.ScrollBarInset.ScrollBar,
		HorizontalScrollBarInset = Enum.ScrollBarInset.ScrollBar,
		Children = {},
	}) :: ScrollingFrame

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

return Util


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
-- Types
-- Constants
-- Variables
-- References
-- Class
return function(frame: Frame)
	local maid = Maid.new()
	task.spawn(function()
		local Module = require(script.Parent:WaitForChild("ColdFusion"))

		local container = maid:GiveTask(Instance.new("Frame"))
		container.AnchorPoint = Vector2.one * 0.5
		container.Position = UDim2.fromScale(0.5, 0.5)
		container.Size = UDim2.fromOffset(300, 400)
		container.BorderSizePixel = 0
		container.Parent = frame

		local uiListLayout = maid:GiveTask(Instance.new("UIListLayout"))
		uiListLayout.Parent = container

		local out = maid:GiveTask(Module.new())
		out.Size = UDim2.fromScale(1, 1)
		out.Parent = container
	end)
	return function()
		maid:Destroy()
	end
end


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Maid = require(_Packages:WaitForChild("Maid"))
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))
local Enums = require(_Package:WaitForChild("Enums"))
local Container = require(_Package:WaitForChild("Util"):WaitForChild("Container"):WaitForChild("ColdFusion"))
local Typography = require(_Package:WaitForChild("Typography"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type Style = Style.Style
type ImageData = Types.ImageData
type FontData = Types.FontData
-- Constants
-- Variables
-- References
-- Private Functions
-- Class
local Util = {}

function Util.fromStyleSimple(
	text: CanBeState<string>,
	colorRoleType: CanBeState<Enums.ColorRoleType>,
	fontType: CanBeState<Enums.FontType>,
	style: CanBeState<Style>,
	elevation: CanBeState<number?>
): TextLabel
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local elevationState: State<number?> = _import(elevation, nil)
	local textState: State<string> = _import(text, "")
	local styleState: State<Style> = _import(style, nil :: any)
	local fontTypeState: State<Enums.FontType> = _import(fontType, Enums.FontType.LabelMedium)
	local colorRoleTypeState: State<Enums.ColorRoleType> =
		_import(colorRoleType, Enums.ColorRoleType.OnBackground)

	local out = _new("TextLabel")({
		Text = textState,
		RichText = true,
		LayoutOrder = 1,
		Visible = _Computed(function(h: string): boolean
			return h:len() > 0
		end, textState),
		TextColor3 = _Computed(function(s: Style, colorRole: Enums.ColorRoleType, e: number?): Color3
			return s:GetColor(colorRole, e)
		end, styleState, colorRoleTypeState, elevationState),
		TextTransparency = 0,
		BackgroundTransparency = 1,
		AutomaticSize = Enum.AutomaticSize.XY,
		TextSize = _Computed(function(s: Style, f: Enums.FontType): number
			return s:GetTextSize(f)
		end, styleState, fontTypeState),
		LineHeight = _Computed(function(s: Style, f: Enums.FontType): number
			return s:GetLineHeight(f)
		end, styleState, fontTypeState),
		FontFace = _Computed(function(s: Style, f: Enums.FontType): Font
			return s:GetFont(f)
		end, styleState, fontTypeState),
		Size = UDim2.fromOffset(0, 0),
	}) :: TextLabel
	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))
	return out
end

function Util.new(
	text: CanBeState<string>,
	textColor3: CanBeState<Color3>,
	textTransparency: CanBeState<number>,
	fontData: CanBeState<FontData>,
	scale: CanBeState<number>,
	leftIcon: CanBeState<ImageData?>,
	rightIcon: CanBeState<ImageData?>,
	paddingDp: CanBeState<number?>,
	ignoreLineHeight: CanBeState<boolean?>,
	textXAlignment: CanBeState<Enum.TextXAlignment?>
): Frame
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)

	local _new = _fuse.new
	local _bind = _fuse.bind
	local _clone = _fuse.clone
	local _import = _fuse.import

	local _Value = _fuse.Value
	local _Computed = _fuse.Computed

	local scaleState: State<number> = _import(scale, 1)
	local fontDataState: State<FontData> = _import(fontData, nil :: any)

	local leftIconState = _import(leftIcon, nil :: ImageData?)
	local rightIconState = _import(rightIcon, nil :: ImageData?)

	local textState = _import(text, "")
	local textColor3State = _import(textColor3, Color3.new(1, 1, 1))
	local textTransparencyState = _import(textTransparency, 0)
	local textXAlignmentState = _import(textXAlignment, Enum.TextXAlignment.Left)

	local ignoreLineHeightState = _import(ignoreLineHeight, false)

	local paddingState: State<number> = _import(paddingDp, 0)

	local iconSizeState = _Computed(function(f: FontData, ign: boolean, sc: number): UDim2
		local dp = (if ign then 1 else Typography.getGuiLineHeight(f.LineHeight, f.Size))
			* Typography.getTextSize(f.Size, sc) -- s:GetTextSize(ft)
		return UDim2.fromOffset(dp, dp)
	end, fontDataState, ignoreLineHeightState, scaleState)

	local out = _bind(maid:GiveTask(Container.new()))({
		Name = "TextLabel",
		Children = {
			_new("UIListLayout")({
				Padding = _Computed(function(sc: number, dp: number): UDim
					return UDim.new(0, sc * dp)
				end, scaleState, paddingState),
				SortOrder = Enum.SortOrder.LayoutOrder,
				FillDirection = Enum.FillDirection.Horizontal,
				ItemLineAlignment = Enum.ItemLineAlignment.Center,
				VerticalAlignment = Enum.VerticalAlignment.Center,
				HorizontalAlignment = Enum.HorizontalAlignment.Center,
				HorizontalFlex = Enum.UIFlexAlignment.Fill,
			}),
			_new("TextLabel")({
				Text = textState,
				RichText = true,
				LayoutOrder = 1,
				Visible = _Computed(function(h: string): boolean
					return h:len() > 0
				end, textState),
				TextColor3 = textColor3State,
				TextTransparency = textTransparencyState,
				BackgroundTransparency = 1,
				TextXAlignment = _Computed(
					function(i: ImageData?, alignment: Enum.TextXAlignment): Enum.TextXAlignment
						return if i then Enum.TextXAlignment.Center else alignment
					end,
					leftIconState,
					textXAlignmentState
				),
				AutomaticSize = Enum.AutomaticSize.X,
				TextSize = _Computed(function(f: FontData, sc: number): number
					return Typography.getTextSize(f.Size, sc)
				end, fontDataState, scaleState),
				LineHeight = _Computed(function(f: FontData, sc: number): number
					return Typography.getGuiLineHeight(f.LineHeight, f.Size)
				end, fontDataState, scaleState),
				FontFace = _Computed(function(f: FontData): Font
					return f.Font
				end, fontDataState),
				Size = _Computed(function(sc: number, f: FontData, ign: boolean): UDim2
					return UDim2.fromOffset(
						0,
						(if ign then 1 else Typography.getGuiLineHeight(f.LineHeight, f.Size))
							* Typography.getTextSize(f.Size, sc)
					)
				end, scaleState, fontDataState, ignoreLineHeightState),
			}),
			_new("ImageLabel")({
				Name = "LeftIcon",
				LayoutOrder = 0,
				BackgroundTransparency = 1,
				Visible = _Computed(function(icon: ImageData?): boolean
					return icon ~= nil
				end, leftIconState),
				Image = _Computed(function(icon: ImageData?): string
					return if icon then icon.Image else ""
				end, leftIconState),
				ImageColor3 = _Computed(function(icon: ImageData?, c: Color3): Color3
					return if icon then c else Color3.new(1, 1, 1)
				end, leftIconState, textColor3State),
				ImageRectOffset = _Computed(function(icon: ImageData?): Vector2
					return if icon then icon.ImageRectOffset else Vector2.zero
				end, leftIconState),
				ImageRectSize = _Computed(function(icon: ImageData?): Vector2
					return if icon then icon.ImageRectSize else Vector2.zero
				end, leftIconState),
				ImageTransparency = textTransparencyState,
				Size = iconSizeState,
			}),
			_new("ImageLabel")({
				Name = "RightIcon",
				LayoutOrder = 2,
				BackgroundTransparency = 1,
				Visible = _Computed(function(icon: ImageData?): boolean
					return icon ~= nil
				end, rightIconState),
				Image = _Computed(function(icon: ImageData?): string
					return if icon then icon.Image else ""
				end, rightIconState),
				ImageColor3 = _Computed(function(icon: ImageData?, c: Color3): Color3
					return if icon then c else Color3.new(1, 1, 1)
				end, rightIconState, textColor3State),
				ImageRectOffset = _Computed(function(icon: ImageData?): Vector2
					return if icon then icon.ImageRectOffset else Vector2.zero
				end, rightIconState),
				ImageRectSize = _Computed(function(icon: ImageData?): Vector2
					return if icon then icon.ImageRectSize else Vector2.zero
				end, rightIconState),
				ImageTransparency = textTransparencyState,
				Size = iconSizeState,
			}),
		},
	}) :: Frame

	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

return Util


--!strict
local _Package = script.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))

-- Types
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type Style = Style.Style
type ImageData = Types.ImageData
-- Constants
-- Variables
-- References
-- Private Functions
-- Class
local Util = {}

Util.Container = {
	ColdFusion = require(script:WaitForChild("Container"):WaitForChild("ColdFusion")),
}
Util.List = {
	ColdFusion = require(script:WaitForChild("List"):WaitForChild("ColdFusion")),
}
Util.Padding = {
	ColdFusion = require(script:WaitForChild("Padding"):WaitForChild("ColdFusion")),
}
Util.TextLabel = {
	ColdFusion = require(script:WaitForChild("TextLabel"):WaitForChild("ColdFusion")),
}
Util.ImageLabel = {
	ColdFusion = require(script:WaitForChild("ImageLabel"):WaitForChild("ColdFusion")),
}
Util.PopUp = {
	ColdFusion = require(script:WaitForChild("PopUp"):WaitForChild("ColdFusion")),
}
Util.ScrollingContainer = {
	ColdFusion = require(script:WaitForChild("ScrollingContainer"):WaitForChild("ColdFusion")),
}

return Util


--!strict
local _Package = script
local _Packages = _Package.Parent
-- Services
-- Packages
-- Modules
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))
local Enums = require(_Package:WaitForChild("Enums"))
-- Types
export type ImageData = Types.ImageData
export type OptionData = Types.OptionData
export type ButtonData = Types.ButtonData
export type FontData = Types.FontData
export type Style = Style.Style
export type Typography = Style.Typography
export type Theme = Style.Theme
export type SoundType = Enums.SoundType
export type FontType = Enums.FontType
export type ButtonStateType = Enums.ButtonStateType
export type SchemeType = Enums.SchemeType
export type CustomColorType = Enums.CustomColorType
export type SelectionState = Enums.SelectionState
export type ColorRoleType = Enums.ColorRoleType
export type PaletteType = Enums.PaletteType
export type TransitionType = Enums.TransitionType

-- Constants
-- Variables
-- References
local Component = _Package:WaitForChild("Component")
-- Private Functions
-- Class
local Synthetic = {}

Synthetic.Enums = Enums
Synthetic.Sounds = require(_Package:WaitForChild("Sounds"))
Synthetic.Util = {
	Container = require(_Package:WaitForChild("Util"):WaitForChild("Container")),
	List = require(_Package:WaitForChild("Util"):WaitForChild("List")),
	Padding = require(_Package:WaitForChild("Util"):WaitForChild("Padding")),
	TextLabel = require(_Package:WaitForChild("Util"):WaitForChild("TextLabel")),
	ImageLabel = require(_Package:WaitForChild("Util"):WaitForChild("ImageLabel")),
	PopUp = require(_Package:WaitForChild("Util"):WaitForChild("PopUp")),
	ScrollingContainer = require(_Package:WaitForChild("Util"):WaitForChild("ScrollingContainer")),
}
Synthetic.Transition = require(_Package:WaitForChild("Transition"))
Synthetic.Types = Types
Synthetic.Style = Style
Synthetic.Theme = require(_Package:WaitForChild("Theme"))
Synthetic.Typography = require(_Package:WaitForChild("Typography"))
Synthetic.Component = {
	Dialog = require(Component:WaitForChild("Dialog")),
	Menu = {
		Row = {
			Tabs = nil,
			Segmented = require(Component:WaitForChild("Menu"):WaitForChild("Row"):WaitForChild("Segmented")),
			Bar = {
				Bottom = require(
					Component:WaitForChild("Menu")
						:WaitForChild("Row")
						:WaitForChild("Bar")
						:WaitForChild("Bottom")
				),
				Navigation = nil,
				Top = {
					Center = require(
						Component:WaitForChild("Menu")
							:WaitForChild("Row")
							:WaitForChild("Bar")
							:WaitForChild("Top")
							:WaitForChild("Center")
					),
					Large = require(
						Component:WaitForChild("Menu")
							:WaitForChild("Row")
							:WaitForChild("Bar")
							:WaitForChild("Top")
							:WaitForChild("Large")
					),
					Medium = require(
						Component:WaitForChild("Menu")
							:WaitForChild("Row")
							:WaitForChild("Bar")
							:WaitForChild("Top")
							:WaitForChild("Medium")
					),
					Small = require(
						Component:WaitForChild("Menu")
							:WaitForChild("Row")
							:WaitForChild("Bar")
							:WaitForChild("Top")
							:WaitForChild("Small")
					),
				},
			},
		},
		Column = {
			Drawer = nil,
			Rail = nil,
			PopUp = nil,
		},
	},
	ProgressIndicator = {
		Circular = require(Component:WaitForChild("ProgressIndicator"):WaitForChild("Circular")),
		Linear = nil,
	},
	Button = {
		Badge = require(Component:WaitForChild("Button"):WaitForChild("Badge")),
		ElevatedButton = require(Component:WaitForChild("Button"):WaitForChild("ElevatedButton")),
		ExtendedFAB = require(Component:WaitForChild("Button"):WaitForChild("ExtendedFAB")),
		FAB = require(Component:WaitForChild("Button"):WaitForChild("FAB")),
		FilledButton = require(Component:WaitForChild("Button"):WaitForChild("FilledButton")),
		FilledIconButton = require(Component:WaitForChild("Button"):WaitForChild("FilledIconButton")),
		IconButton = require(Component:WaitForChild("Button"):WaitForChild("IconButton")),
		Outlined = require(Component:WaitForChild("Button"):WaitForChild("OutlinedButton")),
		OutlinedIcon = require(Component:WaitForChild("Button"):WaitForChild("OutlinedIconButton")),
		Text = require(Component:WaitForChild("Button"):WaitForChild("TextButton")),
		Chip = {
			Filter = require(Component:WaitForChild("Button"):WaitForChild("Chip"):WaitForChild("Filter")),
			Assist = require(Component:WaitForChild("Button"):WaitForChild("Chip"):WaitForChild("Assist")),
		},
	},
	Snackbar = {
		Large = require(Component:WaitForChild("Snackbar"):WaitForChild("Large")),
		Small = require(Component:WaitForChild("Snackbar"):WaitForChild("Small")),
	},
	Search = {
		Filled = require(Component:WaitForChild("Search"):WaitForChild("Filled")),
		Text = require(Component:WaitForChild("Search"):WaitForChild("Text")),
	},
	Checkbox = require(Component:WaitForChild("Checkbox")),
	RadioButton = require(Component:WaitForChild("RadioButton")),
	Switch = require(Component:WaitForChild("Switch")),
	Slider = require(Component:WaitForChild("Slider")),
	TextField = {
		Filled = require(Component:WaitForChild("TextField"):WaitForChild("Filled")),
		Outlined = require(Component:WaitForChild("TextField"):WaitForChild("Outlined")),
	},
}

return Synthetic


--Loads Nexus Admin for the normal deployment.
--!strict

local REQUIRED_LIBRARIES = {
    --Cmdr = "cmdr", --Git submodule used for Cmdr due to outdated release.
    NexusButton = "nexus-button",
    NexusDataStore = "nexus-data-store",
    NexusFeatureFlags = "nexus-feature-flags",
    NexusInstance = "nexus-instance",
    NexusVirtualList = "nexus-virtual-list",
}

return function(LoaderScript,Configuration)
    --Replace the packages when in a Wally package.
    local NexusAdminModule = script:WaitForChild("NexusAdmin")
    local SourcePackages = script.Parent
    if SourcePackages then
        local TargetPackages = NexusAdminModule:WaitForChild("Packages")
        if not TargetPackages:FindFirstChild("_Index") then
            local Index = Instance.new("Folder")
            Index.Name = "_Index"
            Index.Parent = TargetPackages

            for PackageName, WallyPackageName in REQUIRED_LIBRARIES do
                local SourceReference = SourcePackages:FindFirstChild(PackageName)
                local SourcePackage = SourcePackages:FindFirstChild(WallyPackageName, true)
                local TargetPackage = TargetPackages:FindFirstChild(PackageName)
                if SourceReference then
                    SourceReference:Clone().Parent = TargetPackages
                end
                if SourcePackage then
                    SourcePackage.Parent:Clone().Parent = Index
                end
                if TargetPackage then
                    TargetPackage:Destroy()
                end
            end
        end
    end

    --Copy Nexus Admin to ServerScriptService.
    --This is meant to provide backward compatibility with the expected final module location.
    NexusAdminModule.Parent = game:GetService("ServerScriptService")

    --Load Nexus admin.
    local NexusAdmin = require(NexusAdminModule) :: any
    NexusAdmin:Load(Configuration)
    NexusAdmin:LoadIncludedCommands()
    NexusAdmin:LoadClientLoader()

    --Load the child scripts.
    if LoaderScript then
        for _, Ins in LoaderScript:GetChildren() do
            if Ins:IsA("ModuleScript") then
                xpcall(function()
                    local _ = require(Ins) :: any
                end, function(Error)
                    warn(`{Ins:GetFullName()} module failed to load because "{Error}"\n{debug.traceback()}`)
                end)
            end
        end
    end

    --Print that Nexus Admin has loaded (kept from V.1.X.X).
    print(`[NEXUS ADMIN] Nexus Admin {NexusAdmin.Version} sucessfully loaded.`)

    --Return the API.
    return NexusAdmin
end


--Handles users being authorized on the client.
--!strict

local Types = require(script.Parent:WaitForChild("Types"))
local Authorization = require(script.Parent:WaitForChild("Common"):WaitForChild("Authorization")) :: Types.Authorization

local ClientAuthorization = {}
ClientAuthorization.__index = ClientAuthorization
setmetatable(ClientAuthorization, Authorization)

export type ClientAuthorization = {
    AdminLevels: {[string]: number},
} & typeof(setmetatable({}, ClientAuthorization)) & Types.Authorization

--[[
Creates a client authorization instance.
--]]
function ClientAuthorization.new(Configuration: Types.Configuration, NexusAdminRemotes: Folder): ClientAuthorization
    local self = setmetatable(Authorization.new(Configuration) :: Types.Authorization, ClientAuthorization) :: ClientAuthorization
    local AuthorizationEvents = NexusAdminRemotes:WaitForChild("AuthorizationEvents") :: Folder
    self.AdminLevels = (AuthorizationEvents:WaitForChild("GetAdminLevels") :: RemoteFunction):InvokeServer();

    --Connect the remote objects.
    (AuthorizationEvents:WaitForChild("AdminLevelChanged") :: RemoteEvent).OnClientEvent:Connect(function(Player: Player, AdminLevel: number): ()
        self:SetAdminLevel(Player, AdminLevel)
    end)
    return self
end

return ClientAuthorization


--Manages fetching logs on the client.
--!strict

local Types = require(script.Parent:WaitForChild("Types"))
local Logs = require(script.Parent:WaitForChild("Common"):WaitForChild("Logs")) :: Types.Logs

local ClientLogsRegistry = {}
ClientLogsRegistry.__index = ClientLogsRegistry

export type ClientLogsRegistry = {
    GetLogEntriesFunction: RemoteFunction,
    Logs: {[string]: Types.Logs},
} & typeof(setmetatable({}, ClientLogsRegistry)) & Types.Logs

--[[
Creates a client logs registry instance.
--]]
function ClientLogsRegistry.new(NexusAdminRemotes: Folder): ClientLogsRegistry
    local self = setmetatable({}, ClientLogsRegistry) :: ClientLogsRegistry

    --Connect listening for new log entries.
    local LogsRegistryEvents = NexusAdminRemotes:WaitForChild("LogsRegistry")
    local LogAddedEvent = LogsRegistryEvents:WaitForChild("LogAdded") :: RemoteEvent
    self.GetLogEntriesFunction = LogsRegistryEvents:WaitForChild("GetLogEntries") :: RemoteFunction

    self.Logs = {}
    LogAddedEvent.OnClientEvent:Connect(function(LogName, Entry)
        self.Logs[LogName]:Add(Entry)
    end)

    --Return the object.
    return self
end

--[[
Registers a log that can be streamed.
--]]
function ClientLogsRegistry.RegisterLogs(self: ClientLogsRegistry, LogName: string, Logs: Types.Logs): ()
    if self.Logs[LogName] then
        error(`Log already registered: {LogName}`)
    end
    self.Logs[LogName] = Logs
end

--[[
Gets a registered log.
--]]
function ClientLogsRegistry.GetLogs(self: ClientLogsRegistry, LogName: string): Types.Logs
    if not self.Logs[LogName] then
        local ExistingLogs, MaxLogs = self.GetLogEntriesFunction:InvokeServer(LogName)
        if typeof(ExistingLogs) == "string" then
            error(`Unable to get registered log "{LogName}": {ExistingLogs}`)
        end

        local NewLogs = Logs.new(MaxLogs) :: {Logs: {any}} & Types.Logs
        NewLogs.Logs = ExistingLogs
        self.Logs[LogName] = NewLogs
    end
    return self.Logs[LogName]
end

return ClientLogsRegistry