--!strict
-- this script was generated by the build system, please do not make manual edits
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Roact = require(_Packages:WaitForChild("Roact"))

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

local Source = require(script.Parent:WaitForChild("ColdFusion"))

-- Types
type Maid = Maid.Maid
type Style = Style.Style
type FontData = Types.FontData
type OptionData = Types.OptionData
type ButtonData = Types.ButtonData
type ImageData = Types.ImageData
type CanBeState<V> = ColdFusion.CanBeState<V>
-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
-- Variables
-- References
-- Private Functions
-- Class
local Interface = {}

do
	local NewRadioButton = Roact.Component:extend("NewRadioButton")
	NewRadioButton.defaultProps = {
		onSelect = DEFAULTS.NEW.ON_SELECT,
		initialSelection = DEFAULTS.NEW.INITIAL_SELECTION,
		isEnabled = DEFAULTS.NEW.IS_ENABLED,
		outlineColor = DEFAULTS.NEW.OUTLINE_COLOR,
		fillColor = DEFAULTS.NEW.FILL_COLOR,
		iconColor = DEFAULTS.NEW.ICON_COLOR,
		disabledColor = DEFAULTS.NEW.DISABLED_COLOR,
		elevation = DEFAULTS.NEW.ELEVATION,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		fontData = DEFAULTS.NEW.FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewRadioButton:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			onSelect = _Value(self.defaultProps.onSelect),
			initialSelection = _Value(self.defaultProps.initialSelection),
			isEnabled = _Value(self.defaultProps.isEnabled),
			outlineColor = _Value(self.defaultProps.outlineColor),
			fillColor = _Value(self.defaultProps.fillColor),
			iconColor = _Value(self.defaultProps.iconColor),
			disabledColor = _Value(self.defaultProps.disabledColor),
			elevation = _Value(self.defaultProps.elevation),
			schemeType = _Value(self.defaultProps.schemeType),
			fontData = _Value(self.defaultProps.fontData),
			scale = _Value(self.defaultProps.scale),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.new(
			self._internalStates.onSelect,
			self._internalStates.initialSelection,
			self._internalStates.isEnabled,
			self._internalStates.outlineColor,
			self._internalStates.fillColor,
			self._internalStates.iconColor,
			self._internalStates.disabledColor,
			self._internalStates.elevation,
			self._internalStates.schemeType,
			self._internalStates.fontData,
			self._internalStates.scale
		)
	end

	function NewRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return Roact.createElement(Roact.Portal, props)
	end
	function NewRadioButton:didMount()
		for k, v in pairs(self) do
			if typeof(v) == "table" then
				if v["virtualNode"] then
					if self._instance.Parent ~= v["virtualNode"]["hostParent"] then
						self._instance.Parent = v["virtualNode"]["hostParent"]
					end
					break
				end
			end
		end
	end
	function NewRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.New = NewRadioButton
end

do
	local PrimaryRadioButton = Roact.Component:extend("PrimaryRadioButton")
	PrimaryRadioButton.defaultProps = {
		style = DEFAULTS.PRIMARY.STYLE,
		onSelect = DEFAULTS.PRIMARY.ON_SELECT,
		initialSelection = DEFAULTS.PRIMARY.INITIAL_SELECTION,
		elevation = DEFAULTS.PRIMARY.ELEVATION,
		isEnabled = DEFAULTS.PRIMARY.IS_ENABLED,
	}
	function PrimaryRadioButton:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			style = _Value(self.defaultProps.style),
			onSelect = _Value(self.defaultProps.onSelect),
			initialSelection = _Value(self.defaultProps.initialSelection),
			elevation = _Value(self.defaultProps.elevation),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.primary(
			self._internalStates.style,
			self._internalStates.onSelect,
			self._internalStates.initialSelection,
			self._internalStates.elevation,
			self._internalStates.isEnabled
		)
	end

	function PrimaryRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return Roact.createElement(Roact.Portal, props)
	end
	function PrimaryRadioButton:didMount()
		for k, v in pairs(self) do
			if typeof(v) == "table" then
				if v["virtualNode"] then
					if self._instance.Parent ~= v["virtualNode"]["hostParent"] then
						self._instance.Parent = v["virtualNode"]["hostParent"]
					end
					break
				end
			end
		end
	end
	function PrimaryRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Primary = PrimaryRadioButton
end

do
	local SecondaryRadioButton = Roact.Component:extend("SecondaryRadioButton")
	SecondaryRadioButton.defaultProps = {
		style = DEFAULTS.SECONDARY.STYLE,
		onSelect = DEFAULTS.SECONDARY.ON_SELECT,
		initialSelection = DEFAULTS.SECONDARY.INITIAL_SELECTION,
		elevation = DEFAULTS.SECONDARY.ELEVATION,
		isEnabled = DEFAULTS.SECONDARY.IS_ENABLED,
	}
	function SecondaryRadioButton:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			style = _Value(self.defaultProps.style),
			onSelect = _Value(self.defaultProps.onSelect),
			initialSelection = _Value(self.defaultProps.initialSelection),
			elevation = _Value(self.defaultProps.elevation),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.secondary(
			self._internalStates.style,
			self._internalStates.onSelect,
			self._internalStates.initialSelection,
			self._internalStates.elevation,
			self._internalStates.isEnabled
		)
	end

	function SecondaryRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return Roact.createElement(Roact.Portal, props)
	end
	function SecondaryRadioButton:didMount()
		for k, v in pairs(self) do
			if typeof(v) == "table" then
				if v["virtualNode"] then
					if self._instance.Parent ~= v["virtualNode"]["hostParent"] then
						self._instance.Parent = v["virtualNode"]["hostParent"]
					end
					break
				end
			end
		end
	end
	function SecondaryRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Secondary = SecondaryRadioButton
end

do
	local TertiaryRadioButton = Roact.Component:extend("TertiaryRadioButton")
	TertiaryRadioButton.defaultProps = {
		style = DEFAULTS.TERTIARY.STYLE,
		onSelect = DEFAULTS.TERTIARY.ON_SELECT,
		initialSelection = DEFAULTS.TERTIARY.INITIAL_SELECTION,
		elevation = DEFAULTS.TERTIARY.ELEVATION,
		isEnabled = DEFAULTS.TERTIARY.IS_ENABLED,
	}
	function TertiaryRadioButton:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			style = _Value(self.defaultProps.style),
			onSelect = _Value(self.defaultProps.onSelect),
			initialSelection = _Value(self.defaultProps.initialSelection),
			elevation = _Value(self.defaultProps.elevation),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.tertiary(
			self._internalStates.style,
			self._internalStates.onSelect,
			self._internalStates.initialSelection,
			self._internalStates.elevation,
			self._internalStates.isEnabled
		)
	end

	function TertiaryRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return Roact.createElement(Roact.Portal, props)
	end
	function TertiaryRadioButton:didMount()
		for k, v in pairs(self) do
			if typeof(v) == "table" then
				if v["virtualNode"] then
					if self._instance.Parent ~= v["virtualNode"]["hostParent"] then
						self._instance.Parent = v["virtualNode"]["hostParent"]
					end
					break
				end
			end
		end
	end
	function TertiaryRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Tertiary = TertiaryRadioButton
end

do
	local PrimaryContainerRadioButton = Roact.Component:extend("PrimaryContainerRadioButton")
	PrimaryContainerRadioButton.defaultProps = {
		style = DEFAULTS.PRIMARY_CONTAINER.STYLE,
		onSelect = DEFAULTS.PRIMARY_CONTAINER.ON_SELECT,
		initialSelection = DEFAULTS.PRIMARY_CONTAINER.INITIAL_SELECTION,
		elevation = DEFAULTS.PRIMARY_CONTAINER.ELEVATION,
		isEnabled = DEFAULTS.PRIMARY_CONTAINER.IS_ENABLED,
	}
	function PrimaryContainerRadioButton:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			style = _Value(self.defaultProps.style),
			onSelect = _Value(self.defaultProps.onSelect),
			initialSelection = _Value(self.defaultProps.initialSelection),
			elevation = _Value(self.defaultProps.elevation),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.primaryContainer(
			self._internalStates.style,
			self._internalStates.onSelect,
			self._internalStates.initialSelection,
			self._internalStates.elevation,
			self._internalStates.isEnabled
		)
	end

	function PrimaryContainerRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return Roact.createElement(Roact.Portal, props)
	end
	function PrimaryContainerRadioButton:didMount()
		for k, v in pairs(self) do
			if typeof(v) == "table" then
				if v["virtualNode"] then
					if self._instance.Parent ~= v["virtualNode"]["hostParent"] then
						self._instance.Parent = v["virtualNode"]["hostParent"]
					end
					break
				end
			end
		end
	end
	function PrimaryContainerRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.PrimaryContainer = PrimaryContainerRadioButton
end

do
	local SecondaryContainerRadioButton = Roact.Component:extend("SecondaryContainerRadioButton")
	SecondaryContainerRadioButton.defaultProps = {
		style = DEFAULTS.SECONDARY_CONTAINER.STYLE,
		onSelect = DEFAULTS.SECONDARY_CONTAINER.ON_SELECT,
		initialSelection = DEFAULTS.SECONDARY_CONTAINER.INITIAL_SELECTION,
		elevation = DEFAULTS.SECONDARY_CONTAINER.ELEVATION,
		isEnabled = DEFAULTS.SECONDARY_CONTAINER.IS_ENABLED,
	}
	function SecondaryContainerRadioButton:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			style = _Value(self.defaultProps.style),
			onSelect = _Value(self.defaultProps.onSelect),
			initialSelection = _Value(self.defaultProps.initialSelection),
			elevation = _Value(self.defaultProps.elevation),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.secondaryContainer(
			self._internalStates.style,
			self._internalStates.onSelect,
			self._internalStates.initialSelection,
			self._internalStates.elevation,
			self._internalStates.isEnabled
		)
	end

	function SecondaryContainerRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return Roact.createElement(Roact.Portal, props)
	end
	function SecondaryContainerRadioButton:didMount()
		for k, v in pairs(self) do
			if typeof(v) == "table" then
				if v["virtualNode"] then
					if self._instance.Parent ~= v["virtualNode"]["hostParent"] then
						self._instance.Parent = v["virtualNode"]["hostParent"]
					end
					break
				end
			end
		end
	end
	function SecondaryContainerRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.SecondaryContainer = SecondaryContainerRadioButton
end

do
	local TertiaryContainerRadioButton = Roact.Component:extend("TertiaryContainerRadioButton")
	TertiaryContainerRadioButton.defaultProps = {
		style = DEFAULTS.TERTIARY_CONTAINER.STYLE,
		onSelect = DEFAULTS.TERTIARY_CONTAINER.ON_SELECT,
		initialSelection = DEFAULTS.TERTIARY_CONTAINER.INITIAL_SELECTION,
		elevation = DEFAULTS.TERTIARY_CONTAINER.ELEVATION,
		isEnabled = DEFAULTS.TERTIARY_CONTAINER.IS_ENABLED,
	}
	function TertiaryContainerRadioButton:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			style = _Value(self.defaultProps.style),
			onSelect = _Value(self.defaultProps.onSelect),
			initialSelection = _Value(self.defaultProps.initialSelection),
			elevation = _Value(self.defaultProps.elevation),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.tertiaryContainer(
			self._internalStates.style,
			self._internalStates.onSelect,
			self._internalStates.initialSelection,
			self._internalStates.elevation,
			self._internalStates.isEnabled
		)
	end

	function TertiaryContainerRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return Roact.createElement(Roact.Portal, props)
	end
	function TertiaryContainerRadioButton:didMount()
		for k, v in pairs(self) do
			if typeof(v) == "table" then
				if v["virtualNode"] then
					if self._instance.Parent ~= v["virtualNode"]["hostParent"] then
						self._instance.Parent = v["virtualNode"]["hostParent"]
					end
					break
				end
			end
		end
	end
	function TertiaryContainerRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.TertiaryContainer = TertiaryContainerRadioButton
end

return Interface


--!strict
-- this script was generated by the build system, please do not make manual edits
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))

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

local Translators = require(_Package:WaitForChild("Translators"))

local Source = require(script.Parent:WaitForChild("ColdFusion"))

-- Types
type Maid = Maid.Maid
type Style = Style.Style
type FontData = Types.FontData
type OptionData = Types.OptionData
type ButtonData = Types.ButtonData
type ImageData = Types.ImageData
type CanBeState<V> = ColdFusion.CanBeState<V>
type Wrapper<BaseInstance, Definition, ClassName> = Translators.Wrapper<BaseInstance, Definition, ClassName>

export type RadioButtonWrapperDefinition = {
	OnSelect: (isSelected: boolean) -> (),
	InitialSelection: boolean,
	IsEnabled: boolean,
	OutlineColor: Color3,
	FillColor: Color3,
	IconColor: Color3,
	DisabledColor: Color3,
	Elevation: number,
	SchemeType: Enums.SchemeType,
	FontData: FontData,
	Scale: number,
}
export type RadioButtonWrapper = Wrapper<GuiObject, RadioButtonWrapperDefinition, "RadioButton">

export type StyledRadioButtonWrapperDefinition = {
	Style: Style,
	OnSelect: (isSelected: boolean) -> (),
	InitialSelection: boolean,
	Elevation: number?,
	IsEnabled: boolean?,
}
export type StyledRadioButtonWrapper = Wrapper<
	GuiObject,
	StyledRadioButtonWrapperDefinition,
	"StyledRadioButton"
>
-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
-- Variables
-- References
-- Private Functions
-- Interface
local Interface = {}

function Interface.new(): StyledRadioButtonWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		OnSelect = _Value(function(isSelected: boolean) end),
		InitialSelection = _Value(false),
		IsEnabled = _Value(true),
		OutlineColor = _Value(Color3.new()),
		FillColor = _Value(Color3.new()),
		IconColor = _Value(Color3.new()),
		DisabledColor = _Value(Color3.new()),
		Elevation = _Value(0),
		SchemeType = _Value(Enums.SchemeType.Light),
		FontData = _Value(Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14)),
		Scale = _Value(1),
	}
	local defaults: { [string]: unknown? } = {
		onSelect = DEFAULTS.NEW.ON_SELECT,
		initialSelection = DEFAULTS.NEW.INITIAL_SELECTION,
		isEnabled = DEFAULTS.NEW.IS_ENABLED,
		outlineColor = DEFAULTS.NEW.OUTLINE_COLOR,
		fillColor = DEFAULTS.NEW.FILL_COLOR,
		iconColor = DEFAULTS.NEW.ICON_COLOR,
		disabledColor = DEFAULTS.NEW.DISABLED_COLOR,
		elevation = DEFAULTS.NEW.ELEVATION,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		fontData = DEFAULTS.NEW.FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	local inst: GuiObject = Source.new(
		definition.OnSelect,
		definition.InitialSelection,
		definition.IsEnabled,
		definition.OutlineColor,
		definition.FillColor,
		definition.IconColor,
		definition.DisabledColor,
		definition.Elevation,
		definition.SchemeType,
		definition.FontData,
		definition.Scale
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledRadioButton", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.primary(): StyledRadioButtonWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Style = _Value(Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7))),
		OnSelect = _Value(function(isSelected: boolean) end),
		InitialSelection = _Value(false),
		Elevation = _Value(0),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.PRIMARY.STYLE,
		onSelect = DEFAULTS.PRIMARY.ON_SELECT,
		initialSelection = DEFAULTS.PRIMARY.INITIAL_SELECTION,
		elevation = DEFAULTS.PRIMARY.ELEVATION,
		isEnabled = DEFAULTS.PRIMARY.IS_ENABLED,
	}
	local inst: GuiObject = Source.primary(
		definition.Style,
		definition.OnSelect,
		definition.InitialSelection,
		definition.Elevation,
		definition.IsEnabled
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledRadioButton", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.secondary(): StyledRadioButtonWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Style = _Value(Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7))),
		OnSelect = _Value(function(isSelected: boolean) end),
		InitialSelection = _Value(false),
		Elevation = _Value(0),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.SECONDARY.STYLE,
		onSelect = DEFAULTS.SECONDARY.ON_SELECT,
		initialSelection = DEFAULTS.SECONDARY.INITIAL_SELECTION,
		elevation = DEFAULTS.SECONDARY.ELEVATION,
		isEnabled = DEFAULTS.SECONDARY.IS_ENABLED,
	}
	local inst: GuiObject = Source.secondary(
		definition.Style,
		definition.OnSelect,
		definition.InitialSelection,
		definition.Elevation,
		definition.IsEnabled
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledRadioButton", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.tertiary(): StyledRadioButtonWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Style = _Value(Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7))),
		OnSelect = _Value(function(isSelected: boolean) end),
		InitialSelection = _Value(false),
		Elevation = _Value(0),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.TERTIARY.STYLE,
		onSelect = DEFAULTS.TERTIARY.ON_SELECT,
		initialSelection = DEFAULTS.TERTIARY.INITIAL_SELECTION,
		elevation = DEFAULTS.TERTIARY.ELEVATION,
		isEnabled = DEFAULTS.TERTIARY.IS_ENABLED,
	}
	local inst: GuiObject = Source.tertiary(
		definition.Style,
		definition.OnSelect,
		definition.InitialSelection,
		definition.Elevation,
		definition.IsEnabled
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledRadioButton", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.primaryContainer(): StyledRadioButtonWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Style = _Value(Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7))),
		OnSelect = _Value(function(isSelected: boolean) end),
		InitialSelection = _Value(false),
		Elevation = _Value(0),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.PRIMARY_CONTAINER.STYLE,
		onSelect = DEFAULTS.PRIMARY_CONTAINER.ON_SELECT,
		initialSelection = DEFAULTS.PRIMARY_CONTAINER.INITIAL_SELECTION,
		elevation = DEFAULTS.PRIMARY_CONTAINER.ELEVATION,
		isEnabled = DEFAULTS.PRIMARY_CONTAINER.IS_ENABLED,
	}
	local inst: GuiObject = Source.primaryContainer(
		definition.Style,
		definition.OnSelect,
		definition.InitialSelection,
		definition.Elevation,
		definition.IsEnabled
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledRadioButton", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.secondaryContainer(): StyledRadioButtonWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Style = _Value(Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7))),
		OnSelect = _Value(function(isSelected: boolean) end),
		InitialSelection = _Value(false),
		Elevation = _Value(0),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.SECONDARY_CONTAINER.STYLE,
		onSelect = DEFAULTS.SECONDARY_CONTAINER.ON_SELECT,
		initialSelection = DEFAULTS.SECONDARY_CONTAINER.INITIAL_SELECTION,
		elevation = DEFAULTS.SECONDARY_CONTAINER.ELEVATION,
		isEnabled = DEFAULTS.SECONDARY_CONTAINER.IS_ENABLED,
	}
	local inst: GuiObject = Source.secondaryContainer(
		definition.Style,
		definition.OnSelect,
		definition.InitialSelection,
		definition.Elevation,
		definition.IsEnabled
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledRadioButton", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.tertiaryContainer(): StyledRadioButtonWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Style = _Value(Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7))),
		OnSelect = _Value(function(isSelected: boolean) end),
		InitialSelection = _Value(false),
		Elevation = _Value(0),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.TERTIARY_CONTAINER.STYLE,
		onSelect = DEFAULTS.TERTIARY_CONTAINER.ON_SELECT,
		initialSelection = DEFAULTS.TERTIARY_CONTAINER.INITIAL_SELECTION,
		elevation = DEFAULTS.TERTIARY_CONTAINER.ELEVATION,
		isEnabled = DEFAULTS.TERTIARY_CONTAINER.IS_ENABLED,
	}
	local inst: GuiObject = Source.tertiaryContainer(
		definition.Style,
		definition.OnSelect,
		definition.InitialSelection,
		definition.Elevation,
		definition.IsEnabled
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledRadioButton", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

return Interface


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

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

-- Types
-- Constants
-- Variables
-- References

-- Class
return function(frame: Frame)
	local maid = Maid.new()
	task.spawn(function()
		local function makeHalfFrame(isDarkMode: boolean, color: Color3): Frame
			local style = Style.new(
				1.5,
				Enum.Font.SourceSans,
				if isDarkMode then Enums.SchemeType.Dark else Enums.SchemeType.Light,
				color
			)

			local halfFrame = maid:GiveTask(Instance.new("Frame"))
			halfFrame.BackgroundColor3 = style:GetColor(Enums.ColorRoleType.Surface)
			halfFrame.BorderSizePixel = 0

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

			local Module = require(script.Parent:WaitForChild("ColdFusion"))

			do
				local button = maid:GiveTask(
					Module.new(
						function(isSelected: boolean)
							print("is selected", isSelected)
						end,
						true,
						true,
						style:GetColor(Enums.ColorRoleType.OnSurfaceVariant),
						style:GetColor(Enums.ColorRoleType.Primary),
						style:GetColor(Enums.ColorRoleType.OnPrimary),
						style:GetColor(Enums.ColorRoleType.OnSurface),
						0,
						style.SchemeType,
						style:GetFontData(Enums.FontType.LabelLarge),
						style.Scale
					)
				)
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(
					Module.new(
						function(isSelected: boolean)
							print("is selected", isSelected)
						end,
						true,
						false,
						style:GetColor(Enums.ColorRoleType.OnSurfaceVariant),
						style:GetColor(Enums.ColorRoleType.Primary),
						style:GetColor(Enums.ColorRoleType.OnPrimary),
						style:GetColor(Enums.ColorRoleType.OnSurface),
						1,
						style.SchemeType,
						style:GetFontData(Enums.FontType.LabelLarge),
						style.Scale
					)
				)
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(
					Module.new(
						function(isSelected: boolean)
							print("is selected", isSelected)
						end,
						false,
						true,
						style:GetColor(Enums.ColorRoleType.OnSurfaceVariant),
						style:GetColor(Enums.ColorRoleType.Primary),
						style:GetColor(Enums.ColorRoleType.OnPrimary),
						style:GetColor(Enums.ColorRoleType.OnSurface),
						1,
						style.SchemeType,
						style:GetFontData(Enums.FontType.LabelLarge),
						style.Scale
					)
				)
				button.Parent = halfFrame
			end

			-- do
			-- 	local button = maid:GiveTask(
			-- 		Module.new(
			-- 			function(isSelected: boolean?)
			-- 				print("is selected", isSelected)
			-- 			end,
			-- 			false,
			-- 			false,
			-- 			style:GetColor(Enums.ColorRoleType.OnSurfaceVariant),
			-- 			style:GetColor(Enums.ColorRoleType.Primary),
			-- 			style:GetColor(Enums.ColorRoleType.OnPrimary),
			-- 			style:GetColor(Enums.ColorRoleType.OnSurface),
			-- 			1,
			-- 			style.SchemeType,
			-- 			style:GetFontData(Enums.FontType.LabelLarge),
			-- 			style.Scale
			-- 		)
			-- 	)
			-- 	button.Parent = halfFrame
			-- end

			-- do
			-- 	local button = maid:GiveTask(
			-- 		Module.new(
			-- 			function(isSelected: boolean?)
			-- 				print("is selected", isSelected)
			-- 			end,
			-- 			false,
			-- 			true,
			-- 			style:GetColor(Enums.ColorRoleType.OnSurfaceVariant),
			-- 			style:GetColor(Enums.ColorRoleType.Primary),
			-- 			style:GetColor(Enums.ColorRoleType.OnPrimary),
			-- 			style:GetColor(Enums.ColorRoleType.OnSurface),
			-- 			1,
			-- 			style.SchemeType,
			-- 			style:GetFontData(Enums.FontType.LabelLarge),
			-- 			style.Scale
			-- 		)
			-- 	)
			-- 	button.Parent = halfFrame
			-- end

			return halfFrame
		end

		local COLORS: { [number]: Color3 } = {
			Color3.fromHSV(0, 0.9, 0.8),
			-- Color3.fromHSV(0, 0.25, 0.8),
			-- Color3.fromHSV(0, 0.9, 0.5),
			Color3.fromHSV(0.6, 0.9, 0.7),
			Color3.fromHSV(0.35, 0.9, 0.7),
			-- Color3.fromHSV(0.1, 0.9, 0.7),
		}

		for i, color in ipairs(COLORS) do
			local x = (i - 1) / #COLORS
			local width = 1 / #COLORS
			local dark = makeHalfFrame(true, color)

			dark.Size = UDim2.fromScale(width, 0.5)
			dark.Position = UDim2.fromScale(x, 0.5)
			dark.Parent = frame

			local bright = makeHalfFrame(false, color)
			bright.Size = UDim2.fromScale(width, 0.5)
			bright.Position = UDim2.fromScale(x, 0)
			bright.Parent = frame
		end
	end)
	return function()
		maid:Destroy()
	end
end


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

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

-- Types
-- Constants
-- Variables
-- References

-- Class
return function(frame: Frame)
	local maid = Maid.new()
	task.spawn(function()
		local function makeHalfFrame(isDarkMode: boolean, color: Color3): Frame
			local style = Style.new(
				1,
				Enum.Font.SourceSans,
				if isDarkMode then Enums.SchemeType.Dark else Enums.SchemeType.Light,
				color
			)

			local halfFrame = maid:GiveTask(Instance.new("Frame"))
			halfFrame.BackgroundColor3 = style:GetColor(Enums.ColorRoleType.Surface)
			halfFrame.BorderSizePixel = 0
			local listLayout = maid:GiveTask(Instance.new("UIListLayout"))
			listLayout.FillDirection = Enum.FillDirection.Vertical
			listLayout.Padding = UDim.new(0, 10)
			listLayout.VerticalAlignment = Enum.VerticalAlignment.Center
			listLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
			listLayout.Parent = halfFrame

			local Module = require(script.Parent:WaitForChild("ColdFusion"))

			do
				local button = maid:GiveTask(Module.primary(style, function(isSelected: boolean)
					print("is selected", isSelected)
				end, true))
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(Module.secondary(style, function(isSelected: boolean)
					print("is selected", isSelected)
				end, true))
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(Module.tertiary(style, function(isSelected: boolean)
					print("is selected", isSelected)
				end, true))
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(Module.primaryContainer(style, function(isSelected: boolean)
					print("is selected", isSelected)
				end, true))
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(Module.secondaryContainer(style, function(isSelected: boolean)
					print("is selected", isSelected)
				end, true))
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(Module.tertiaryContainer(style, function(isSelected: boolean)
					print("is selected", isSelected)
				end, true))
				button.Parent = halfFrame
			end
			return halfFrame
		end

		local COLORS: { [number]: Color3 } = {
			Color3.fromHSV(0, 0.9, 0.8),
			Color3.fromHSV(0, 0.25, 0.8),
			Color3.fromHSV(0, 0.9, 0.5),
			Color3.fromHSV(0.6, 0.9, 0.7),
			Color3.fromHSV(0.35, 0.9, 0.7),
			Color3.fromHSV(0.1, 0.9, 0.7),
		}

		for i, color in ipairs(COLORS) do
			local x = (i - 1) / #COLORS
			local width = 1 / #COLORS
			local dark = makeHalfFrame(true, color)

			dark.Size = UDim2.fromScale(width, 0.5)
			dark.Position = UDim2.fromScale(x, 0.5)
			dark.Parent = frame

			local bright = makeHalfFrame(false, color)
			bright.Size = UDim2.fromScale(width, 0.5)
			bright.Position = UDim2.fromScale(x, 0)
			bright.Parent = frame
		end
	end)
	return function()
		maid:Destroy()
	end
end


--!strict
local _Package = script.Parent.Parent.Parent
local _Packages = _Package.Parent

-- Services
local RunService = game:GetService("RunService")
local SoundService = game:GetService("SoundService")
local UserInputService = game:GetService("UserInputService")

-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
local Icons = require(_Packages:WaitForChild("MaterialIcons"))

-- Modules
local IconButton = require(
	_Package
		:WaitForChild("Component")
		:WaitForChild("Button")
		:WaitForChild("IconButton")
		:WaitForChild("ColdFusion")
)

local Util = require(_Package:WaitForChild("Util"))
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))
local Enums = require(_Package:WaitForChild("Enums"))
local Sounds = require(_Package:WaitForChild("Sounds"))
local Theme = require(_Package:WaitForChild("Theme"))
local Typography = require(_Package:WaitForChild("Typography"))

-- Types
type Maid = Maid.Maid
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type RenderData = Types.RenderData
type ImageData = Types.ImageData
type OptionData = Types.OptionData
type ButtonData = Types.ButtonData
type AppearanceData = Types.AppearanceData
type Style = Style.Style
type FontData = Types.FontData
export type OptionConstructor = (key: string, onClick: (key: string) -> ()) -> GuiObject
-- Constants
local PADDING_DP = 8
local CORNER_DP = 4
local HEIGHT_DP = 40
local ICON_SIZE_DP = 18
local BUTTON_PADDING_DP = 12
local PADDING_BETWEEN_ELEMENTS_DP = 8

-- Variables
-- References

-- Private Functions

function newPanel(
	isFilled: boolean,
	onClick: (content: string) -> (),
	initialText: string,
	button: GuiObject,
	textColorState: State<Color3>,
	backgroundColorState: State<Color3>,
	optionSolverState: State<(input: string) -> { string }>,
	optionConstructorState: State<OptionConstructor>,
	elevationState: State<number>,
	schemeTypeState: State<Enums.SchemeType>,
	fontDataState: State<FontData>,
	scaleState: State<number>
): GuiObject
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

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

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

	local absolutePositionState = _Value(button.AbsolutePosition + Vector2.new(0, button.AbsoluteSize.Y))

	local elevatedTextColorState = _Computed(function(st: Enums.SchemeType, tC: Color3, e: number): Color3
		return Theme.getElevatedColor(tC, e, st)
	end, schemeTypeState, textColorState, elevationState)

	local textBox = _new("TextBox")({
		LayoutOrder = 2,
		AutomaticSize = Enum.AutomaticSize.None,
		TextXAlignment = Enum.TextXAlignment.Left,
		BackgroundTransparency = 1,
		TextColor3 = elevatedTextColorState,
		Text = initialText,
		ClipsDescendants = false,
		TextSize = _Computed(function(f: FontData, sc: number): number
			return Typography.getTextSize(f.Size, sc)
		end, fontDataState, scaleState),
		LineHeight = _Computed(function(f: FontData): number
			return Typography.getGuiLineHeight(f.LineHeight, f.Size)
		end, fontDataState),
		FontFace = _Computed(function(f: FontData): Font
			return f.Font
		end, fontDataState),
		Size = _Computed(function(sc: number): UDim2
			return UDim2.new(1, 0, 0, sc * 40)
		end, scaleState),
		ClearTextOnFocus = false,
		Children = {
			_new("UIFlexItem")({
				FlexMode = Enum.UIFlexMode.Shrink,
			}),
		},
	}) :: TextBox

	textBox.TextTruncate = Enum.TextTruncate.None

	local currentTextState = _Value(textBox.Text)
	maid:GiveTask(textBox:GetPropertyChangedSignal("Text"):Connect(function()
		currentTextState:Set(textBox.Text)
	end))

	local optionsState = _Computed(function(solver: (input: string) -> { string }, txt: string): { string }
		return solver(txt)
	end, optionSolverState, currentTextState)

	maid:GiveTask(textBox.ReturnPressedFromOnScreenKeyboard:Connect(function()
		onClick(textBox.Text)
	end))

	maid:GiveTask(UserInputService.InputBegan:Connect(function(inputObj: InputObject)
		if inputObj.KeyCode == Enum.KeyCode.KeypadEnter or inputObj.KeyCode == Enum.KeyCode.Return then
			onClick(textBox.Text)
		end
	end))

	-- maid:GiveTask(textBox.FocusLost:Connect(function()
	-- 	onClick(textBox.Text)
	-- end))

	local backButton = _bind(
		IconButton.new(
			function()
				onClick(textBox.Text)
			end,
			Icons.arrow_back,
			textColorState,
			textColorState,
			true,
			elevationState,
			schemeTypeState,
			fontDataState,
			scaleState
		)
	)({
		Name = "BackButton",
		LayoutOrder = 1,
	}) :: GuiObject

	local clearButton = _bind(
		IconButton.new(
			function()
				textBox.Text = ""
				textBox:CaptureFocus()
			end,
			Icons.clear,
			textColorState,
			textColorState,
			true,
			elevationState,
			schemeTypeState,
			fontDataState,
			scaleState
		)
	)({
		Name = "ClearButton",
		LayoutOrder = 3,
	}) :: GuiObject

	local scrollingFrame =
		_bind(maid:GiveTask(Util.ScrollingContainer.ColdFusion.new(0, textColorState)) :: ScrollingFrame)({
			LayoutOrder = 1,
			Size = UDim2.fromScale(1, 0),
			AutomaticSize = Enum.AutomaticSize.Y,
			AutomaticCanvasSize = Enum.AutomaticSize.Y,
			Children = {
				maid:GiveTask(Util.List.ColdFusion.classic(
					Enum.VerticalAlignment.Top,
					Enum.HorizontalAlignment.Left,
					Enum.FillDirection.Vertical,
					UDim.new(0, 0) -- _Computed(function(s: Style): UDim
					-- 	return UDim.new(0, s.Scale * PADDING_DP * 0.5)
					-- end, styleState)
				)) :: Instance,
			},
		}) :: ScrollingFrame

	local optionRegistry: { [string]: GuiObject } = {}

	local function updateOptions(opts: { string }, constructor: OptionConstructor)
		local registry: { [string]: true? } = {}
		for i, v in ipairs(opts) do
			registry[v] = true
			if not optionRegistry[v] then
				local gui = constructor(v, function()
					-- print(`on-click={v}`)
					textBox.Text = v
					onClick(v)
				end)
				gui.Parent = scrollingFrame

				maid[`option={v}`] = gui
				optionRegistry[v] = gui
			end
		end
		for k, v in pairs(optionRegistry) do
			if registry[k] == nil then
				v:Destroy()
			end
		end
		-- local rep = scrollingFrame:Clone()
		-- rep.Name = `tick={tick()}`
		-- rep.Parent = workspace
	end

	optionsState:Connect(function(cur: { string }, prev: { string }?)
		updateOptions(cur, optionConstructorState:Get())
	end)

	optionConstructorState:Connect(function(cur: OptionConstructor, prev: OptionConstructor?)
		updateOptions(optionsState:Get(), cur)
	end)

	local inst = _bind(Util.PopUp.ColdFusion.new(absolutePositionState, Vector2.zero))({
		Name = "SearchMenu",
		BackgroundColor3 = _Computed(function(st: Enums.SchemeType, bC: Color3, e: number): Color3
			return Theme.getElevatedColor(bC, e, st)
		end, schemeTypeState, backgroundColorState, elevationState),
		BackgroundTransparency = if isFilled then 0 else 1,
		AutomaticSize = Enum.AutomaticSize.Y,
		Children = {
			_new("UICorner")({
				CornerRadius = _Computed(function(sc: number): UDim
					return UDim.new(0, math.round(sc * CORNER_DP))
				end, scaleState),
			}),
			_new("Frame")({
				Name = "InputContainer",
				LayoutOrder = 1,
				BackgroundTransparency = 1,
				AutomaticSize = Enum.AutomaticSize.None,
				Size = _Computed(function(sc: number)
					return UDim2.new(1, 0, 0, sc * 40)
				end, scaleState),
				Children = {
					textBox :: Instance,
					maid:GiveTask(Util.Padding.ColdFusion.new(
						_Computed(function(sc: number): UDim
							return UDim.new(0, sc * PADDING_DP)
						end, scaleState),
						UDim.new()
					)),
					maid:GiveTask(
						Util.List.ColdFusion.new(
							Enum.VerticalAlignment.Center,
							Enum.HorizontalAlignment.Left,
							Enum.FillDirection.Horizontal,
							_Computed(function(sc: number): UDim
								return UDim.new(0, sc * PADDING_DP)
							end, scaleState),
							Enum.UIFlexAlignment.None,
							Enum.UIFlexAlignment.SpaceBetween,
							Enum.ItemLineAlignment.Center,
							false
						)
					),
					_bind(maid:GiveTask(Util.Container.ColdFusion.new()))({
						Name = "BackButtonContainer",
						LayoutOrder = 1,
						Children = {
							_new("UIScale")({
								Scale = 0.6,
							}) :: Instance,
							maid:GiveTask(Util.List.ColdFusion.center()),
							backButton,
						},
					}),
					-- backButton,
					_bind(maid:GiveTask(Util.Container.ColdFusion.new()))({
						Name = "ClearButtonContainer",
						LayoutOrder = 2,
						Children = {
							_new("UIScale")({
								Scale = 0.6,
							}) :: Instance,
							maid:GiveTask(Util.List.ColdFusion.center()),
							clearButton,
						},
					}),
				},
			}),
			maid:GiveTask(
				Util.List.ColdFusion.classic(
					Enum.VerticalAlignment.Top,
					Enum.HorizontalAlignment.Left,
					Enum.FillDirection.Vertical,
					UDim.new(0, 0)
				)
			),
			scrollingFrame,
		},
	}) :: GuiObject

	maid:GiveTask(RunService.RenderStepped:Connect(function(deltaTime: number)
		local pos = button.AbsolutePosition --+Vector2.new(0, button.AbsoluteSize.Y)

		inst.Size = UDim2.fromOffset(button.AbsoluteSize.X, button.AbsoluteSize.Y + 1)
		absolutePositionState:Set(pos)
	end))

	textBox:CaptureFocus()

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

	return inst
end

-- Class
local Base = {}

function Base.new(
	isFilled: boolean,
	onInputEntered: CanBeState<(input: string) -> string>,
	label: CanBeState<string?>,
	optionSolver: CanBeState<(input: string) -> { string }>,
	optionConstructor: CanBeState<OptionConstructor?>,
	textColor: CanBeState<Color3>,
	backgroundColor: CanBeState<Color3>,
	elevation: CanBeState<number>,
	schemeType: CanBeState<Enums.SchemeType>,
	fontData: CanBeState<FontData>,
	scale: CanBeState<number>
): GuiObject
	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 schemeTypeState: State<Enums.SchemeType> = _import(schemeType, Enums.SchemeType.Light)
	local fontDataState: State<FontData> = _import(fontData, nil :: any)

	local onInputEnteredState: State<(input: string) -> string> = _import(
		onInputEntered,
		function(input: string): string
			return input
		end
	)
	local textColorState: State<Color3> = _import(textColor, Color3.new())
	local elevationState = _import(elevation, 0)

	local nextElevationState = _Computed(function(e: number): number
		return e + 1
	end, elevationState)
	local backgroundColorState: State<Color3> = _import(backgroundColor, Color3.new())

	local function newDefaultOption(key: string, onClick: (key: string) -> ()): GuiObject
		local labelMaid = Maid.new()
		local fuse = ColdFusion.fuse(labelMaid)

		local elevatedTextColorState = fuse.Computed(
			function(st: Enums.SchemeType, tC: Color3, e: number): Color3
				return Theme.getElevatedColor(tC, e, st)
			end,
			schemeTypeState,
			textColorState,
			nextElevationState
		)
		local elevatedBackgroundColorState = fuse.Computed(
			function(st: Enums.SchemeType, tC: Color3, e: number): Color3
				return Theme.getElevatedColor(tC, e, st)
			end,
			schemeTypeState,
			backgroundColorState,
			nextElevationState
		)
		local isHoveredState = fuse.Value(false)

		local out = fuse.new("TextButton")({
			Name = "OptionButton",
			Text = key,
			AutomaticSize = Enum.AutomaticSize.Y,
			TextXAlignment = Enum.TextXAlignment.Left,
			Size = UDim2.fromScale(1, 0),
			AutoButtonColor = true,
			BackgroundTransparency = if isFilled then 0 else 1,
			BackgroundColor3 = elevatedBackgroundColorState,
			TextColor3 = elevatedTextColorState,
			ClipsDescendants = false,
			TextSize = _Computed(function(f: FontData, sc: number): number
				return Typography.getTextSize(f.Size, sc)
			end, fontDataState, scaleState),
			LineHeight = _Computed(function(f: FontData): number
				return Typography.getGuiLineHeight(f.LineHeight, f.Size)
			end, fontDataState),
			FontFace = _Computed(function(f: FontData): Font
				return f.Font
			end, fontDataState),
			Events = {
				Activated = function()
					onClick(key)
				end,
				MouseEnter = function()
					isHoveredState:Set(true)
				end,
				MouseLeave = function()
					isHoveredState:Set(false)
				end,
				SelectionGained = function()
					isHoveredState:Set(true)
				end,
				SelectionLost = function()
					isHoveredState:Set(false)
				end,
			},
			Children = {
				labelMaid:GiveTask(Util.Padding.ColdFusion.new(
					_Computed(function(sc: number): UDim
						return UDim.new(0, sc * PADDING_DP)
					end, scaleState),
					_Computed(function(sc: number): UDim
						return UDim.new(0, sc * PADDING_DP * 0.75)
					end, scaleState)
				)) :: Instance,
				_new("UICorner")({
					CornerRadius = _Computed(function(sc: number): UDim
						return UDim.new(0, math.round(sc * CORNER_DP))
					end, scaleState),
				}),
			},
		}) :: TextButton

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

		return out
	end

	local optionSolverState = _import(optionSolver, function(input: string): { string }
		return {}
	end)
	local optionConstructorState: State<OptionConstructor> = _import(optionConstructor, newDefaultOption)
	local labelState: State<string> = _import(label, "Search")
	local inputState = _Value("")
	local buttonTextState = _Computed(function(l: string, i: string): string
		return if i:len() == 0 then l else i
	end, labelState, inputState)

	local button: GuiObject

	local panelMaid = maid:GiveTask(Maid.new())
	local isEnabledState = _Value(true)

	local function onClick()
		panelMaid:DoCleaning()
		local panel = newPanel(
			isFilled,
			function(content: string)
				inputState:Set(content)
				panelMaid:DoCleaning()
				local onEnter = onInputEnteredState:Get()
				if onEnter then
					inputState:Set(onEnter(content))
				end
			end,
			inputState:Get(),
			button,
			textColorState,
			backgroundColorState,
			optionSolverState,
			optionConstructorState,
			nextElevationState,
			schemeTypeState,
			fontDataState,
			scaleState
		)
		isEnabledState:Set(false)
		panelMaid:GiveTask(function()
			isEnabledState:Set(true)
		end)
		panelMaid:GiveTask(panel)
	end

	local isFocusedState = _Value(false)
	local isPressedState = _Value(false)
	local isHoveredState = _Value(false)
	local textScaleState = _import(1, 1)
	local currentStateState = _Computed(
		function(
			isEnab: boolean,
			isFocused: boolean,
			isPressed: boolean,
			isHovered: boolean
		): Enums.ButtonStateType
			if isEnab then
				if isPressed then
					return Enums.ButtonStateType.Pressed
				else
					if isHovered then
						return Enums.ButtonStateType.Hovered
					else
						if isFocused then
							return Enums.ButtonStateType.Focused
						else
							return Enums.ButtonStateType.Enabled
						end
					end
				end
			else
				return Enums.ButtonStateType.Disabled
			end
		end,
		isEnabledState,
		isFocusedState,
		isPressedState,
		isHoveredState
	) :: State<any>

	local renderDatasState: State<{ [Enums.ButtonStateType]: RenderData }>

	if isFilled then
		renderDatasState = _Computed(
			function(
				st: Enums.SchemeType,
				sc: number,
				f: FontData,
				e: number,
				tC: Color3,
				sC: Color3,
				dTC: Color3,
				dSC: Color3,
				i: ImageData?
			): { [Enums.ButtonStateType]: RenderData }
				e += 1
				return {
					[Enums.ButtonStateType.Enabled] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(sC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(sC, e, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 0),
						f,
						i,
						nil,
						nil
					),
					[Enums.ButtonStateType.Disabled] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(dSC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(dSC, e, st), 0.12),
						Types._AppearanceData.new(Theme.getElevatedColor(dTC, e, st), 0.12),
						f,
						i,
						nil,
						nil
					),
					[Enums.ButtonStateType.Hovered] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(sC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(sC, e + 1, st), 0.08),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e + 1, st), 0.08),
						f,
						i,
						nil,
						nil
					),
					[Enums.ButtonStateType.Focused] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(sC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(sC, e, st), 0.1),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 0.1),
						f,
						i,
						nil,
						nil
					),
					[Enums.ButtonStateType.Pressed] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(sC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(sC, e - 1, st), 0.1),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e - 1, st), 0.1),
						f,
						i,
						Types._SoundData.new(Sounds.Library[Enums.SoundType.ui_tap_variant_01], 0),
						nil
					),
				}
			end,
			schemeTypeState,
			scaleState,
			fontDataState,
			elevationState,
			textColorState,
			backgroundColorState,
			textColorState,
			backgroundColorState,
			_Value(Icons.search)
		)
	else
		renderDatasState = _Computed(
			function(
				st: Enums.SchemeType,
				sc: number,
				f: FontData,
				e: number,
				hC: Color3,
				tC: Color3,
				dC: Color3,
				i: ImageData?
			): { [Enums.ButtonStateType]: RenderData }
				e += 1
				return {
					[Enums.ButtonStateType.Enabled] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 0),
						f,
						i,
						nil,
						nil
					),
					[Enums.ButtonStateType.Disabled] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(dC, e, st), 1),
						f,
						i,
						nil,
						nil
					),
					[Enums.ButtonStateType.Hovered] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e + 1, st), 1 - 0.08),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e + 1, st), 0),
						f,
						i,
						nil,
						nil
					),
					[Enums.ButtonStateType.Focused] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e, st), 1 - 0.1),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 0),
						f,
						i,
						nil,
						nil
					),
					[Enums.ButtonStateType.Pressed] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(hC, e - 1, st), 1 - 0.1),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e - 1, st), 0),
						f,
						i,
						Types._SoundData.new(Sounds.Library[Enums.SoundType.ui_tap_variant_01], 1),
						nil
					),
				}
			end,
			schemeTypeState,
			scaleState,
			fontDataState,
			elevationState,
			backgroundColorState,
			textColorState,
			textColorState,
			_Value(Icons.search)
		)
	end

	local currentRenderDataState = _Computed(
		function(state: Enums.ButtonStateType, r: { [Enums.ButtonStateType]: RenderData }): RenderData
			local renderData = r[state]
			assert(renderData ~= nil, `no renderData for {state}`)
			return renderData
		end,
		currentStateState,
		renderDatasState
	)
	local currentTextRenderData: State<AppearanceData> = _Computed(function(rData: RenderData): AppearanceData
		local tData = rData.Text
		assert(tData, `bad text data`)
		return tData
	end, currentRenderDataState)
	local sound = _new("Sound")({
		SoundId = _Computed(function(st: RenderData): string
			return if st.Sound then st.Sound.SoundId else ""
		end, currentRenderDataState),
		Volume = _Computed(function(st: RenderData): number
			return if st.Sound then st.Sound.Volume else 0
		end, currentRenderDataState),
	}) :: Sound
	local fontState = _Computed(function(st: RenderData): Font
		return if st.Font then st.Font.Font else Font.fromEnum(Enum.Font.Roboto)
	end, currentRenderDataState)

	currentRenderDataState:Connect(function()
		task.wait()
		SoundService:PlayLocalSound(sound)
	end)

	button = _new("TextButton")({
		Name = "Search",
		Text = "",
		BackgroundTransparency = _Computed(function(renderData: RenderData): number
			if renderData.Shadow then
				return 0
			else
				return renderData.Background.Transparency
			end
		end, currentRenderDataState),
		BackgroundColor3 = _Computed(function(renderData: RenderData): Color3
			return renderData.Background.Color3
		end, currentRenderDataState),
		Active = isEnabledState,
		AutomaticSize = Enum.AutomaticSize.XY,
		Size = _Computed(function(s: number, ts: number): UDim2
			return UDim2.fromOffset(0, s * HEIGHT_DP * ts)
		end, scaleState, textScaleState),
		Events = {
			Activated = function()
				if isEnabledState:Get() == false then
					return
				end
				onClick()
			end,
			MouseButton1Down = function()
				if isEnabledState:Get() == false then
					return
				end
				isPressedState:Set(true)
			end,
			MouseButton1Up = function()
				if isEnabledState:Get() == false then
					return
				end
				isPressedState:Set(false)
			end,
			MouseEnter = function()
				isHoveredState:Set(true)
			end,
			MouseLeave = function()
				isHoveredState:Set(false)
			end,
			SelectionGained = function()
				isFocusedState:Set(true)
			end,
			SelectionLost = function()
				isFocusedState:Set(false)
			end,
		},
		Children = {
			maid:GiveTask(Util.Padding.ColdFusion.new(
				_Computed(function(sc: number): UDim
					return UDim.new(0, sc * BUTTON_PADDING_DP)
				end, scaleState),
				_Computed(function(sc: number): UDim
					return UDim.new(0, sc * BUTTON_PADDING_DP)
				end, scaleState)
			)) :: Instance,
			_new("UICorner")({
				CornerRadius = UDim.new(0.5, 0),
			}),
			_new("UIListLayout")({
				Padding = _Computed(function(s: number): UDim
					return UDim.new(0, s * PADDING_BETWEEN_ELEMENTS_DP)
				end, scaleState),
				SortOrder = Enum.SortOrder.LayoutOrder,
				FillDirection = Enum.FillDirection.Horizontal,
				ItemLineAlignment = Enum.ItemLineAlignment.Center,
				VerticalAlignment = Enum.VerticalAlignment.Center,
				HorizontalAlignment = Enum.HorizontalAlignment.Left,
			}),
			_new("TextLabel")({
				Text = buttonTextState,
				Visible = true,
				TextScaled = true,
				TextXAlignment = Enum.TextXAlignment.Left,
				TextYAlignment = Enum.TextYAlignment.Center,
				BackgroundTransparency = 1,
				AutomaticSize = Enum.AutomaticSize.X,
				FontFace = fontState,
				LayoutOrder = 2,
				TextColor3 = _Computed(function(renderData: AppearanceData): Color3
					return renderData.Color3
				end, currentTextRenderData),
				TextTransparency = _Computed(function(renderData: AppearanceData): number
					return renderData.Transparency
				end, currentTextRenderData),
				Size = _Computed(function(s: number, ts: number): UDim2
					return UDim2.fromOffset(0, s * ICON_SIZE_DP * ts)
				end, scaleState, textScaleState),
			}),
			_new("ImageLabel")({
				Name = "Icon",
				LayoutOrder = 1,
				BackgroundTransparency = 1,
				Visible = true,
				Image = Icons.search.Image,
				ImageColor3 = _Computed(function(renderData: AppearanceData): Color3
					return renderData.Color3
				end, currentTextRenderData),
				ImageRectOffset = Icons.search.ImageRectOffset,
				ImageRectSize = Icons.search.ImageRectSize,
				ImageTransparency = _Computed(function(renderData: AppearanceData): number
					return renderData.Transparency
				end, currentTextRenderData),
				SizeConstraint = Enum.SizeConstraint.RelativeYY,
				Size = _Computed(function(s: number): UDim2
					return UDim2.fromOffset(s * ICON_SIZE_DP, s * ICON_SIZE_DP)
				end, scaleState),
			}),
		},
	}) :: TextButton

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

	return button
end

return Base


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

-- Modules
local Base = require(script.Parent.Parent:WaitForChild("Base"))
local Types = require(_Package:WaitForChild("Types"))
local Style = require(_Package:WaitForChild("Style"))
local Enums = require(_Package:WaitForChild("Enums"))

-- Types
type Maid = Maid.Maid
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type RenderData = Types.RenderData
type ImageData = Types.ImageData
type OptionData = Types.OptionData
type ButtonData = Types.ButtonData
type Style = Style.Style
type Method = () -> ()
type OptionConstructor = Base.OptionConstructor
type FontData = Types.FontData

-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))

-- Variables
-- References
-- Private Functions

-- Class
local Interface = {}

function Interface.tertiaryContainer(
	style: CanBeState<Style>,
	onInputEntered: CanBeState<(input: string) -> string>,
	label: CanBeState<string?>,
	optionSolver: CanBeState<(input: string) -> { [number]: string }>,
	optionConstructor: CanBeState<OptionConstructor?>,
	elevation: CanBeState<number?>
): GuiObject
	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 styleState: State<Style> = _import(style, DEFAULTS.TERTIARY_CONTAINER.STYLE)
	local elevationState = _import(elevation, DEFAULTS.TERTIARY_CONTAINER.ELEVATION or 0)

	local out = Base.new(
		true,
		_import(onInputEntered, DEFAULTS.TERTIARY_CONTAINER.ON_INPUT_ENTERED),
		_import(label, DEFAULTS.TERTIARY_CONTAINER.LABEL),
		_import(optionSolver, DEFAULTS.TERTIARY_CONTAINER.OPTION_SOLVER),
		_import(optionConstructor, DEFAULTS.TERTIARY_CONTAINER.OPTION_CONSTRUCTOR),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.OnTertiaryContainer)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.TertiaryContainer)
		end, styleState),
		elevationState,
		_Computed(function(s: Style): any
			return s.SchemeType
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.LabelLarge)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)
	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Interface.tertiary(
	style: CanBeState<Style>,
	onInputEntered: CanBeState<(input: string) -> string>,
	label: CanBeState<string?>,
	optionSolver: CanBeState<(input: string) -> { [number]: string }>,
	optionConstructor: CanBeState<OptionConstructor?>,
	elevation: CanBeState<number?>
): GuiObject
	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 styleState: State<Style> = _import(style, DEFAULTS.TERTIARY.STYLE)
	local elevationState = _import(elevation, DEFAULTS.TERTIARY.ELEVATION)

	local out = Base.new(
		true,
		_import(onInputEntered, DEFAULTS.TERTIARY.ON_INPUT_ENTERED),
		_import(label, DEFAULTS.TERTIARY.LABEL),
		_import(optionSolver, DEFAULTS.TERTIARY.OPTION_SOLVER),
		_import(optionConstructor, DEFAULTS.TERTIARY.OPTION_CONSTRUCTOR),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.OnTertiary)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.Tertiary)
		end, styleState),
		elevationState,
		_Computed(function(s: Style): any
			return s.SchemeType
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.LabelLarge)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)
	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Interface.secondaryContainer(
	style: CanBeState<Style>,
	onInputEntered: CanBeState<(input: string) -> string>,
	label: CanBeState<string?>,
	optionSolver: CanBeState<(input: string) -> { [number]: string }>,
	optionConstructor: CanBeState<OptionConstructor?>,
	elevation: CanBeState<number?>
): GuiObject
	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 styleState: State<Style> = _import(style, DEFAULTS.SECONDARY_CONTAINER.STYLE)
	local elevationState = _import(elevation, DEFAULTS.SECONDARY_CONTAINER.ELEVATION)

	local out = Base.new(
		true,
		_import(onInputEntered, DEFAULTS.SECONDARY_CONTAINER.ON_INPUT_ENTERED),
		_import(label, DEFAULTS.SECONDARY_CONTAINER.LABEL),
		_import(optionSolver, DEFAULTS.SECONDARY_CONTAINER.OPTION_SOLVER),
		_import(optionConstructor, DEFAULTS.SECONDARY_CONTAINER.OPTION_CONSTRUCTOR),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.OnSecondaryContainer)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.SecondaryContainer)
		end, styleState),
		elevationState,
		_Computed(function(s: Style): any
			return s.SchemeType
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.LabelLarge)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)
	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Interface.secondary(
	style: CanBeState<Style>,
	onInputEntered: CanBeState<(input: string) -> string>,
	label: CanBeState<string?>,
	optionSolver: CanBeState<(input: string) -> { [number]: string }>,
	optionConstructor: CanBeState<OptionConstructor?>,
	elevation: CanBeState<number?>
): GuiObject
	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 styleState: State<Style> = _import(style, DEFAULTS.SECONDARY.STYLE)
	local elevationState = _import(elevation, DEFAULTS.SECONDARY.ELEVATION)

	local out = Base.new(
		true,
		_import(onInputEntered, DEFAULTS.SECONDARY.ON_INPUT_ENTERED),
		_import(label, DEFAULTS.SECONDARY.LABEL),
		_import(optionSolver, DEFAULTS.SECONDARY.OPTION_SOLVER),
		_import(optionConstructor, DEFAULTS.SECONDARY.OPTION_CONSTRUCTOR),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.OnSecondary)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.Secondary)
		end, styleState),
		elevationState,
		_Computed(function(s: Style): any
			return s.SchemeType
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.LabelLarge)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)
	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Interface.primaryContainer(
	style: CanBeState<Style>,
	onInputEntered: CanBeState<(input: string) -> string>,
	label: CanBeState<string?>,
	optionSolver: CanBeState<(input: string) -> { [number]: string }>,
	optionConstructor: CanBeState<OptionConstructor?>,
	elevation: CanBeState<number?>
): GuiObject
	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 styleState: State<Style> = _import(style, DEFAULTS.PRIMARY_CONTAINER.STYLE)
	local elevationState = _import(elevation, DEFAULTS.PRIMARY_CONTAINER.ELEVATION)

	local out = Base.new(
		true,
		_import(onInputEntered, DEFAULTS.PRIMARY_CONTAINER.ON_INPUT_ENTERED),
		_import(label, DEFAULTS.PRIMARY_CONTAINER.LABEL),
		_import(optionSolver, DEFAULTS.PRIMARY_CONTAINER.OPTION_SOLVER),
		_import(optionConstructor, DEFAULTS.PRIMARY_CONTAINER.OPTION_CONSTRUCTOR),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.OnPrimaryContainer)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.PrimaryContainer)
		end, styleState),
		elevationState,
		_Computed(function(s: Style): any
			return s.SchemeType
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.LabelLarge)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)
	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Interface.primary(
	style: CanBeState<Style>,
	onInputEntered: CanBeState<(input: string) -> string>,
	label: CanBeState<string?>,
	optionSolver: CanBeState<(input: string) -> { [number]: string }>,
	optionConstructor: CanBeState<OptionConstructor?>,
	elevation: CanBeState<number?>
): GuiObject
	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 styleState: State<Style> = _import(style, DEFAULTS.PRIMARY.STYLE)
	local elevationState = _import(elevation, DEFAULTS.PRIMARY.ELEVATION)

	local out = Base.new(
		true,
		_import(onInputEntered, DEFAULTS.PRIMARY.ON_INPUT_ENTERED),
		_import(label, DEFAULTS.PRIMARY.LABEL),
		_import(optionSolver, DEFAULTS.PRIMARY.OPTION_SOLVER),
		_import(optionConstructor, DEFAULTS.PRIMARY.OPTION_CONSTRUCTOR),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.OnPrimary)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.Primary)
		end, styleState),
		elevationState,
		_Computed(function(s: Style): any
			return s.SchemeType
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.LabelLarge)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)
	maid:GiveTask(out.Destroying:Connect(function()
		maid:Destroy()
	end))

	return out
end

function Interface.new(
	onInputEntered: CanBeState<(input: string) -> string>,
	label: CanBeState<string?>,
	optionSolver: CanBeState<(input: string) -> { [number]: string }>,
	optionConstructor: CanBeState<OptionConstructor?>,
	textColor: CanBeState<Color3>,
	backgroundColor: CanBeState<Color3>,
	elevation: CanBeState<number>,
	schemeType: CanBeState<Enums.SchemeType>,
	fontData: CanBeState<FontData>,
	scale: CanBeState<number>
): GuiObject
	return Base.new(
		true,
		if onInputEntered ~= nil then onInputEntered else DEFAULTS.NEW.ON_INPUT_ENTERED,
		if label ~= nil then label else DEFAULTS.NEW.LABEL,
		if optionSolver ~= nil then optionSolver else DEFAULTS.NEW.OPTION_SOLVER,
		if optionConstructor ~= nil then optionConstructor else DEFAULTS.NEW.OPTION_CONSTRUCTOR,
		if textColor ~= nil then textColor else DEFAULTS.NEW.TEXT_COLOR,
		if backgroundColor ~= nil then backgroundColor else DEFAULTS.NEW.BACKGROUND_COLOR,
		if elevation ~= nil then elevation else DEFAULTS.NEW.ELEVATION or 0,
		if schemeType ~= nil then schemeType else DEFAULTS.NEW.SCHEME_TYPE,
		if fontData ~= nil then fontData else DEFAULTS.NEW.FONT_DATA,
		if scale ~= nil then scale else DEFAULTS.NEW.SCALE
	)
end

return Interface


--!strict
-- this script was generated by the build system, please do not make manual edits
local _Package = script.Parent.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))

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

-- Types
type Maid = Maid.Maid
type Style = Style.Style
type FontData = Types.FontData
type OptionData = Types.OptionData
type ButtonData = Types.ButtonData
type ImageData = Types.ImageData
type CanBeState<V> = ColdFusion.CanBeState<V>

return {
	NEW = {
		ON_INPUT_ENTERED = function(input: string)
			return input
		end,
		LABEL = "",
		OPTION_SOLVER = function(input: string)
			return {}
		end,
		OPTION_CONSTRUCTOR = nil :: ((key: string, onClick: (key: string) -> ()) -> GuiObject)?,
		TEXT_COLOR = Color3.new(),
		BACKGROUND_COLOR = Color3.new(),
		ELEVATION = 0,
		SCHEME_TYPE = Enums.SchemeType.Light,
		FONT_DATA = Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14),
		SCALE = 1,
	},
	PRIMARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_INPUT_ENTERED = function(input: string)
			return input
		end,
		LABEL = "",
		OPTION_SOLVER = function(input: string)
			return {}
		end,
		OPTION_CONSTRUCTOR = nil :: ((key: string, onClick: (key: string) -> ()) -> GuiObject)?,
		ELEVATION = 0,
	},
	SECONDARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_INPUT_ENTERED = function(input: string)
			return input
		end,
		LABEL = "",
		OPTION_SOLVER = function(input: string)
			return {}
		end,
		OPTION_CONSTRUCTOR = nil :: ((key: string, onClick: (key: string) -> ()) -> GuiObject)?,
		ELEVATION = 0,
	},
	TERTIARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_INPUT_ENTERED = function(input: string)
			return input
		end,
		LABEL = "",
		OPTION_SOLVER = function(input: string)
			return {}
		end,
		OPTION_CONSTRUCTOR = nil :: ((key: string, onClick: (key: string) -> ()) -> GuiObject)?,
		ELEVATION = 0,
	},
	PRIMARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_INPUT_ENTERED = function(input: string)
			return input
		end,
		LABEL = "",
		OPTION_SOLVER = function(input: string)
			return {}
		end,
		OPTION_CONSTRUCTOR = nil :: ((key: string, onClick: (key: string) -> ()) -> GuiObject)?,
		ELEVATION = 0,
	},
	SECONDARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_INPUT_ENTERED = function(input: string)
			return input
		end,
		LABEL = "",
		OPTION_SOLVER = function(input: string)
			return {}
		end,
		OPTION_CONSTRUCTOR = nil :: ((key: string, onClick: (key: string) -> ()) -> GuiObject)?,
		ELEVATION = 0,
	},
	TERTIARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_INPUT_ENTERED = function(input: string)
			return input
		end,
		LABEL = "",
		OPTION_SOLVER = function(input: string)
			return {}
		end,
		OPTION_CONSTRUCTOR = nil :: ((key: string, onClick: (key: string) -> ()) -> GuiObject)?,
		ELEVATION = 0,
	},
}


--!strict
-- this script was generated by the build system, please do not make manual edits
local _Package = script.Parent.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))

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

local Translators = require(_Package:WaitForChild("Translators"))

local Source = require(script.Parent:WaitForChild("ColdFusion"))

-- Types
type Maid = Maid.Maid
type Style = Style.Style
type FontData = Types.FontData
type OptionData = Types.OptionData
type ButtonData = Types.ButtonData
type ImageData = Types.ImageData
type CanBeState<V> = ColdFusion.CanBeState<V>
type FusionCanBeState<V> = Translators.FusionCanBeState<V>

-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
-- Variables
-- References
-- Private Functions
-- Class
local Interface = {}

function Interface.new(
	onInputEntered: FusionCanBeState<(input: string) -> string>,
	label: FusionCanBeState<string?>,
	optionSolver: FusionCanBeState<(input: string) -> { string }>,
	optionConstructor: FusionCanBeState<(((key: string, onClick: (key: string) -> ()) -> GuiObject)?)>,
	textColor: FusionCanBeState<Color3>,
	backgroundColor: FusionCanBeState<Color3>,
	elevation: FusionCanBeState<number>,
	schemeType: FusionCanBeState<Enums.SchemeType>,
	fontData: FusionCanBeState<FontData>,
	scale: FusionCanBeState<number>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.new(
		convert(onInputEntered, DEFAULTS.NEW.ON_INPUT_ENTERED),
		convert(label, DEFAULTS.NEW.LABEL),
		convert(optionSolver, DEFAULTS.NEW.OPTION_SOLVER),
		convert(optionConstructor, DEFAULTS.NEW.OPTION_CONSTRUCTOR),
		convert(textColor, DEFAULTS.NEW.TEXT_COLOR),
		convert(backgroundColor, DEFAULTS.NEW.BACKGROUND_COLOR),
		convert(elevation, DEFAULTS.NEW.ELEVATION),
		convert(schemeType, DEFAULTS.NEW.SCHEME_TYPE),
		convert(fontData, DEFAULTS.NEW.FONT_DATA),
		convert(scale, DEFAULTS.NEW.SCALE)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.primary(
	style: FusionCanBeState<Style>,
	onInputEntered: FusionCanBeState<(input: string) -> string>,
	label: FusionCanBeState<string?>,
	optionSolver: FusionCanBeState<(input: string) -> { string }>,
	optionConstructor: FusionCanBeState<
		(((key: string, onClick: (key: string) -> ()) -> GuiObject)?)
	>,
	elevation: FusionCanBeState<number?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.primary(
		convert(style, DEFAULTS.PRIMARY.STYLE),
		convert(onInputEntered, DEFAULTS.PRIMARY.ON_INPUT_ENTERED),
		convert(label, DEFAULTS.PRIMARY.LABEL),
		convert(optionSolver, DEFAULTS.PRIMARY.OPTION_SOLVER),
		convert(optionConstructor, DEFAULTS.PRIMARY.OPTION_CONSTRUCTOR),
		convert(elevation, DEFAULTS.PRIMARY.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.secondary(
	style: FusionCanBeState<Style>,
	onInputEntered: FusionCanBeState<(input: string) -> string>,
	label: FusionCanBeState<string?>,
	optionSolver: FusionCanBeState<(input: string) -> { string }>,
	optionConstructor: FusionCanBeState<
		(((key: string, onClick: (key: string) -> ()) -> GuiObject)?)
	>,
	elevation: FusionCanBeState<number?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.secondary(
		convert(style, DEFAULTS.SECONDARY.STYLE),
		convert(onInputEntered, DEFAULTS.SECONDARY.ON_INPUT_ENTERED),
		convert(label, DEFAULTS.SECONDARY.LABEL),
		convert(optionSolver, DEFAULTS.SECONDARY.OPTION_SOLVER),
		convert(optionConstructor, DEFAULTS.SECONDARY.OPTION_CONSTRUCTOR),
		convert(elevation, DEFAULTS.SECONDARY.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.tertiary(
	style: FusionCanBeState<Style>,
	onInputEntered: FusionCanBeState<(input: string) -> string>,
	label: FusionCanBeState<string?>,
	optionSolver: FusionCanBeState<(input: string) -> { string }>,
	optionConstructor: FusionCanBeState<
		(((key: string, onClick: (key: string) -> ()) -> GuiObject)?)
	>,
	elevation: FusionCanBeState<number?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.tertiary(
		convert(style, DEFAULTS.TERTIARY.STYLE),
		convert(onInputEntered, DEFAULTS.TERTIARY.ON_INPUT_ENTERED),
		convert(label, DEFAULTS.TERTIARY.LABEL),
		convert(optionSolver, DEFAULTS.TERTIARY.OPTION_SOLVER),
		convert(optionConstructor, DEFAULTS.TERTIARY.OPTION_CONSTRUCTOR),
		convert(elevation, DEFAULTS.TERTIARY.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.primaryContainer(
	style: FusionCanBeState<Style>,
	onInputEntered: FusionCanBeState<(input: string) -> string>,
	label: FusionCanBeState<string?>,
	optionSolver: FusionCanBeState<(input: string) -> { string }>,
	optionConstructor: FusionCanBeState<
		(((key: string, onClick: (key: string) -> ()) -> GuiObject)?)
	>,
	elevation: FusionCanBeState<number?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.primaryContainer(
		convert(style, DEFAULTS.PRIMARY_CONTAINER.STYLE),
		convert(onInputEntered, DEFAULTS.PRIMARY_CONTAINER.ON_INPUT_ENTERED),
		convert(label, DEFAULTS.PRIMARY_CONTAINER.LABEL),
		convert(optionSolver, DEFAULTS.PRIMARY_CONTAINER.OPTION_SOLVER),
		convert(optionConstructor, DEFAULTS.PRIMARY_CONTAINER.OPTION_CONSTRUCTOR),
		convert(elevation, DEFAULTS.PRIMARY_CONTAINER.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.secondaryContainer(
	style: FusionCanBeState<Style>,
	onInputEntered: FusionCanBeState<(input: string) -> string>,
	label: FusionCanBeState<string?>,
	optionSolver: FusionCanBeState<(input: string) -> { string }>,
	optionConstructor: FusionCanBeState<
		(((key: string, onClick: (key: string) -> ()) -> GuiObject)?)
	>,
	elevation: FusionCanBeState<number?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.secondaryContainer(
		convert(style, DEFAULTS.SECONDARY_CONTAINER.STYLE),
		convert(onInputEntered, DEFAULTS.SECONDARY_CONTAINER.ON_INPUT_ENTERED),
		convert(label, DEFAULTS.SECONDARY_CONTAINER.LABEL),
		convert(optionSolver, DEFAULTS.SECONDARY_CONTAINER.OPTION_SOLVER),
		convert(optionConstructor, DEFAULTS.SECONDARY_CONTAINER.OPTION_CONSTRUCTOR),
		convert(elevation, DEFAULTS.SECONDARY_CONTAINER.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.tertiaryContainer(
	style: FusionCanBeState<Style>,
	onInputEntered: FusionCanBeState<(input: string) -> string>,
	label: FusionCanBeState<string?>,
	optionSolver: FusionCanBeState<(input: string) -> { string }>,
	optionConstructor: FusionCanBeState<
		(((key: string, onClick: (key: string) -> ()) -> GuiObject)?)
	>,
	elevation: FusionCanBeState<number?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.tertiaryContainer(
		convert(style, DEFAULTS.TERTIARY_CONTAINER.STYLE),
		convert(onInputEntered, DEFAULTS.TERTIARY_CONTAINER.ON_INPUT_ENTERED),
		convert(label, DEFAULTS.TERTIARY_CONTAINER.LABEL),
		convert(optionSolver, DEFAULTS.TERTIARY_CONTAINER.OPTION_SOLVER),
		convert(optionConstructor, DEFAULTS.TERTIARY_CONTAINER.OPTION_CONSTRUCTOR),
		convert(elevation, DEFAULTS.TERTIARY_CONTAINER.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

return Interface