--!strict
local _Package = script.Parent.Parent.Parent.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 TopBase = require(script.Parent.Parent:WaitForChild("Base"))
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 ImageData = Types.ImageData
type OptionData = Types.OptionData
type ButtonData = Types.ButtonData
type Style = Style.Style
type FontData = Types.FontData
-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))

-- Variables
-- References
-- Private Functions

-- Class
local Interface = {}

function newThemedComponent(
	themeDefaults: typeof(DEFAULTS.PRIMARY),
	style: CanBeState<Style>,

	backgroundColor: Enums.ColorRoleType,
	textColor: Enums.ColorRoleType,

	title: CanBeState<string>,
	buttons: CanBeState<{ ButtonData }>,
	navigation: CanBeState<ButtonData?>,
	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, themeDefaults.STYLE)

	local out = Interface.new(
		_import(title, themeDefaults.TITLE),
		_import(buttons, themeDefaults.BUTTONS),
		_import(navigation, themeDefaults.NAVIGATION),
		_Computed(function(s: Style): Color3
			return s:GetColor(backgroundColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(textColor)
		end, styleState),
		_import(elevation, themeDefaults.ELEVATION),
		_Computed(function(s: Style): any
			return s.SchemeType
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.TitleLarge)
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.HeadlineMedium)
		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

Interface = {}

function Interface.primary(
	style: CanBeState<Style>,
	title: CanBeState<string>,
	buttons: CanBeState<{ ButtonData }>,
	navigation: CanBeState<ButtonData?>,
	elevation: CanBeState<number?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.PRIMARY,
		style,
		Enums.ColorRoleType.Primary,
		Enums.ColorRoleType.OnPrimary,
		title,
		buttons,
		navigation,
		elevation
	)
end

function Interface.secondary(
	style: CanBeState<Style>,
	title: CanBeState<string>,
	buttons: CanBeState<{ ButtonData }>,
	navigation: CanBeState<ButtonData?>,
	elevation: CanBeState<number?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.SECONDARY,
		style,
		Enums.ColorRoleType.Secondary,
		Enums.ColorRoleType.OnSecondary,
		title,
		buttons,
		navigation,
		elevation
	)
end

function Interface.tertiary(
	style: CanBeState<Style>,
	title: CanBeState<string>,
	buttons: CanBeState<{ ButtonData }>,
	navigation: CanBeState<ButtonData?>,
	elevation: CanBeState<number?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.TERTIARY,
		style,
		Enums.ColorRoleType.Tertiary,
		Enums.ColorRoleType.OnTertiary,
		title,
		buttons,
		navigation,
		elevation
	)
end

function Interface.new(
	title: CanBeState<string>,
	buttons: CanBeState<{ ButtonData }>,
	navigation: CanBeState<ButtonData?>,
	backgroundColor: CanBeState<Color3>,
	textColor: CanBeState<Color3>,
	elevation: CanBeState<number>,
	schemeType: CanBeState<Enums.SchemeType>,
	titleFontData: CanBeState<FontData>,
	subHeadingFontData: CanBeState<FontData>,
	buttonFontData: CanBeState<FontData>,
	scale: CanBeState<number>
): GuiObject
	return TopBase.new(
		if title then title else DEFAULTS.NEW.TITLE,
		if buttons then buttons else DEFAULTS.NEW.BUTTONS,
		if navigation then navigation else DEFAULTS.NEW.NAVIGATION,
		"Small",
		if backgroundColor then backgroundColor else DEFAULTS.NEW.BACKGROUND_COLOR,
		if textColor then textColor else DEFAULTS.NEW.TEXT_COLOR,
		if elevation then elevation elseif DEFAULTS.NEW.ELEVATION then DEFAULTS.NEW.ELEVATION else 0,
		if schemeType then schemeType else DEFAULTS.NEW.SCHEME_TYPE,
		if titleFontData then titleFontData else DEFAULTS.NEW.TITLE_FONT_DATA,
		if subHeadingFontData then subHeadingFontData else DEFAULTS.NEW.SUB_HEADING_FONT_DATA,
		if buttonFontData then buttonFontData else DEFAULTS.NEW.BUTTON_FONT_DATA,
		if scale 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.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))

local React = require(_Packages:WaitForChild("React"))
local ReactRoblox = require(_Packages:WaitForChild("ReactRoblox"))

-- 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 NewMenuRowBarTopSmall = React.Component:extend("NewMenuRowBarTopSmall")
	NewMenuRowBarTopSmall.defaultProps = {
		title = DEFAULTS.NEW.TITLE,
		buttons = DEFAULTS.NEW.BUTTONS,
		navigation = DEFAULTS.NEW.NAVIGATION,
		backgroundColor = DEFAULTS.NEW.BACKGROUND_COLOR,
		textColor = DEFAULTS.NEW.TEXT_COLOR,
		elevation = DEFAULTS.NEW.ELEVATION,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		titleFontData = DEFAULTS.NEW.TITLE_FONT_DATA,
		subHeadingFontData = DEFAULTS.NEW.SUB_HEADING_FONT_DATA,
		buttonFontData = DEFAULTS.NEW.BUTTON_FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewMenuRowBarTopSmall:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			title = _Value(self.defaultProps.title),
			buttons = _Value(self.defaultProps.buttons),
			navigation = _Value(self.defaultProps.navigation),
			backgroundColor = _Value(self.defaultProps.backgroundColor),
			textColor = _Value(self.defaultProps.textColor),
			elevation = _Value(self.defaultProps.elevation),
			schemeType = _Value(self.defaultProps.schemeType),
			titleFontData = _Value(self.defaultProps.titleFontData),
			subHeadingFontData = _Value(self.defaultProps.subHeadingFontData),
			buttonFontData = _Value(self.defaultProps.buttonFontData),
			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.title,
			self._internalStates.buttons,
			self._internalStates.navigation,
			self._internalStates.backgroundColor,
			self._internalStates.textColor,
			self._internalStates.elevation,
			self._internalStates.schemeType,
			self._internalStates.titleFontData,
			self._internalStates.subHeadingFontData,
			self._internalStates.buttonFontData,
			self._internalStates.scale
		)
	end

	function NewMenuRowBarTopSmall: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 React.createElement(ReactRoblox.createPortal, props)
	end
	function NewMenuRowBarTopSmall:componentDidMount()
		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 NewMenuRowBarTopSmall:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.New = NewMenuRowBarTopSmall
end

do
	local PrimaryMenuRowBarTopSmall = React.Component:extend("PrimaryMenuRowBarTopSmall")
	PrimaryMenuRowBarTopSmall.defaultProps = {
		style = DEFAULTS.PRIMARY.STYLE,
		title = DEFAULTS.PRIMARY.TITLE,
		buttons = DEFAULTS.PRIMARY.BUTTONS,
		navigation = DEFAULTS.PRIMARY.NAVIGATION,
		elevation = DEFAULTS.PRIMARY.ELEVATION,
	}
	function PrimaryMenuRowBarTopSmall: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),
			title = _Value(self.defaultProps.title),
			buttons = _Value(self.defaultProps.buttons),
			navigation = _Value(self.defaultProps.navigation),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.title,
			self._internalStates.buttons,
			self._internalStates.navigation,
			self._internalStates.elevation
		)
	end

	function PrimaryMenuRowBarTopSmall: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 React.createElement(ReactRoblox.createPortal, props)
	end
	function PrimaryMenuRowBarTopSmall:componentDidMount()
		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 PrimaryMenuRowBarTopSmall:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Primary = PrimaryMenuRowBarTopSmall
end

do
	local SecondaryMenuRowBarTopSmall = React.Component:extend("SecondaryMenuRowBarTopSmall")
	SecondaryMenuRowBarTopSmall.defaultProps = {
		style = DEFAULTS.SECONDARY.STYLE,
		title = DEFAULTS.SECONDARY.TITLE,
		buttons = DEFAULTS.SECONDARY.BUTTONS,
		navigation = DEFAULTS.SECONDARY.NAVIGATION,
		elevation = DEFAULTS.SECONDARY.ELEVATION,
	}
	function SecondaryMenuRowBarTopSmall: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),
			title = _Value(self.defaultProps.title),
			buttons = _Value(self.defaultProps.buttons),
			navigation = _Value(self.defaultProps.navigation),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.title,
			self._internalStates.buttons,
			self._internalStates.navigation,
			self._internalStates.elevation
		)
	end

	function SecondaryMenuRowBarTopSmall: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 React.createElement(ReactRoblox.createPortal, props)
	end
	function SecondaryMenuRowBarTopSmall:componentDidMount()
		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 SecondaryMenuRowBarTopSmall:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Secondary = SecondaryMenuRowBarTopSmall
end

do
	local TertiaryMenuRowBarTopSmall = React.Component:extend("TertiaryMenuRowBarTopSmall")
	TertiaryMenuRowBarTopSmall.defaultProps = {
		style = DEFAULTS.TERTIARY.STYLE,
		title = DEFAULTS.TERTIARY.TITLE,
		buttons = DEFAULTS.TERTIARY.BUTTONS,
		navigation = DEFAULTS.TERTIARY.NAVIGATION,
		elevation = DEFAULTS.TERTIARY.ELEVATION,
	}
	function TertiaryMenuRowBarTopSmall: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),
			title = _Value(self.defaultProps.title),
			buttons = _Value(self.defaultProps.buttons),
			navigation = _Value(self.defaultProps.navigation),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.title,
			self._internalStates.buttons,
			self._internalStates.navigation,
			self._internalStates.elevation
		)
	end

	function TertiaryMenuRowBarTopSmall: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 React.createElement(ReactRoblox.createPortal, props)
	end
	function TertiaryMenuRowBarTopSmall:componentDidMount()
		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 TertiaryMenuRowBarTopSmall:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Tertiary = TertiaryMenuRowBarTopSmall
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.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 NewMenuRowBarTopSmall = Roact.Component:extend("NewMenuRowBarTopSmall")
	NewMenuRowBarTopSmall.defaultProps = {
		title = DEFAULTS.NEW.TITLE,
		buttons = DEFAULTS.NEW.BUTTONS,
		navigation = DEFAULTS.NEW.NAVIGATION,
		backgroundColor = DEFAULTS.NEW.BACKGROUND_COLOR,
		textColor = DEFAULTS.NEW.TEXT_COLOR,
		elevation = DEFAULTS.NEW.ELEVATION,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		titleFontData = DEFAULTS.NEW.TITLE_FONT_DATA,
		subHeadingFontData = DEFAULTS.NEW.SUB_HEADING_FONT_DATA,
		buttonFontData = DEFAULTS.NEW.BUTTON_FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewMenuRowBarTopSmall:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			title = _Value(self.defaultProps.title),
			buttons = _Value(self.defaultProps.buttons),
			navigation = _Value(self.defaultProps.navigation),
			backgroundColor = _Value(self.defaultProps.backgroundColor),
			textColor = _Value(self.defaultProps.textColor),
			elevation = _Value(self.defaultProps.elevation),
			schemeType = _Value(self.defaultProps.schemeType),
			titleFontData = _Value(self.defaultProps.titleFontData),
			subHeadingFontData = _Value(self.defaultProps.subHeadingFontData),
			buttonFontData = _Value(self.defaultProps.buttonFontData),
			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.title,
			self._internalStates.buttons,
			self._internalStates.navigation,
			self._internalStates.backgroundColor,
			self._internalStates.textColor,
			self._internalStates.elevation,
			self._internalStates.schemeType,
			self._internalStates.titleFontData,
			self._internalStates.subHeadingFontData,
			self._internalStates.buttonFontData,
			self._internalStates.scale
		)
	end

	function NewMenuRowBarTopSmall: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 NewMenuRowBarTopSmall: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 NewMenuRowBarTopSmall:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.New = NewMenuRowBarTopSmall
end

do
	local PrimaryMenuRowBarTopSmall = Roact.Component:extend("PrimaryMenuRowBarTopSmall")
	PrimaryMenuRowBarTopSmall.defaultProps = {
		style = DEFAULTS.PRIMARY.STYLE,
		title = DEFAULTS.PRIMARY.TITLE,
		buttons = DEFAULTS.PRIMARY.BUTTONS,
		navigation = DEFAULTS.PRIMARY.NAVIGATION,
		elevation = DEFAULTS.PRIMARY.ELEVATION,
	}
	function PrimaryMenuRowBarTopSmall: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),
			title = _Value(self.defaultProps.title),
			buttons = _Value(self.defaultProps.buttons),
			navigation = _Value(self.defaultProps.navigation),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.title,
			self._internalStates.buttons,
			self._internalStates.navigation,
			self._internalStates.elevation
		)
	end

	function PrimaryMenuRowBarTopSmall: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 PrimaryMenuRowBarTopSmall: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 PrimaryMenuRowBarTopSmall:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Primary = PrimaryMenuRowBarTopSmall
end

do
	local SecondaryMenuRowBarTopSmall = Roact.Component:extend("SecondaryMenuRowBarTopSmall")
	SecondaryMenuRowBarTopSmall.defaultProps = {
		style = DEFAULTS.SECONDARY.STYLE,
		title = DEFAULTS.SECONDARY.TITLE,
		buttons = DEFAULTS.SECONDARY.BUTTONS,
		navigation = DEFAULTS.SECONDARY.NAVIGATION,
		elevation = DEFAULTS.SECONDARY.ELEVATION,
	}
	function SecondaryMenuRowBarTopSmall: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),
			title = _Value(self.defaultProps.title),
			buttons = _Value(self.defaultProps.buttons),
			navigation = _Value(self.defaultProps.navigation),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.title,
			self._internalStates.buttons,
			self._internalStates.navigation,
			self._internalStates.elevation
		)
	end

	function SecondaryMenuRowBarTopSmall: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 SecondaryMenuRowBarTopSmall: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 SecondaryMenuRowBarTopSmall:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Secondary = SecondaryMenuRowBarTopSmall
end

do
	local TertiaryMenuRowBarTopSmall = Roact.Component:extend("TertiaryMenuRowBarTopSmall")
	TertiaryMenuRowBarTopSmall.defaultProps = {
		style = DEFAULTS.TERTIARY.STYLE,
		title = DEFAULTS.TERTIARY.TITLE,
		buttons = DEFAULTS.TERTIARY.BUTTONS,
		navigation = DEFAULTS.TERTIARY.NAVIGATION,
		elevation = DEFAULTS.TERTIARY.ELEVATION,
	}
	function TertiaryMenuRowBarTopSmall: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),
			title = _Value(self.defaultProps.title),
			buttons = _Value(self.defaultProps.buttons),
			navigation = _Value(self.defaultProps.navigation),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.title,
			self._internalStates.buttons,
			self._internalStates.navigation,
			self._internalStates.elevation
		)
	end

	function TertiaryMenuRowBarTopSmall: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 TertiaryMenuRowBarTopSmall: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 TertiaryMenuRowBarTopSmall:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Tertiary = TertiaryMenuRowBarTopSmall
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.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 SmallWrapperDefinition = {
	Title: string,
	Buttons: { ButtonData },
	Navigation: ButtonData?,
	BackgroundColor: Color3,
	TextColor: Color3,
	Elevation: number,
	SchemeType: Enums.SchemeType,
	TitleFontData: FontData,
	SubHeadingFontData: FontData,
	ButtonFontData: FontData,
	Scale: number,
}
export type SmallWrapper = Wrapper<GuiObject, SmallWrapperDefinition, "Small">

export type StyledSmallWrapperDefinition = {
	Style: Style,
	Title: string,
	Buttons: { ButtonData },
	Navigation: ButtonData?,
	Elevation: number?,
}
export type StyledSmallWrapper = Wrapper<GuiObject, StyledSmallWrapperDefinition, "StyledSmall">
-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
-- Variables
-- References
-- Private Functions
-- Interface
local Interface = {}

function Interface.new(): StyledSmallWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Title = _Value("Title"),
		Buttons = _Value({}),
		Navigation = _Value(nil),
		BackgroundColor = _Value(Color3.new()),
		TextColor = _Value(Color3.new()),
		Elevation = _Value(0),
		SchemeType = _Value(Enums.SchemeType.Light),
		TitleFontData = _Value(Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14)),
		SubHeadingFontData = _Value(Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14)),
		ButtonFontData = _Value(Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14)),
		Scale = _Value(1),
	}
	local defaults: { [string]: unknown? } = {
		title = DEFAULTS.NEW.TITLE,
		buttons = DEFAULTS.NEW.BUTTONS,
		navigation = DEFAULTS.NEW.NAVIGATION,
		backgroundColor = DEFAULTS.NEW.BACKGROUND_COLOR,
		textColor = DEFAULTS.NEW.TEXT_COLOR,
		elevation = DEFAULTS.NEW.ELEVATION,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		titleFontData = DEFAULTS.NEW.TITLE_FONT_DATA,
		subHeadingFontData = DEFAULTS.NEW.SUB_HEADING_FONT_DATA,
		buttonFontData = DEFAULTS.NEW.BUTTON_FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	local inst: GuiObject = Source.new(
		definition.Title,
		definition.Buttons,
		definition.Navigation,
		definition.BackgroundColor,
		definition.TextColor,
		definition.Elevation,
		definition.SchemeType,
		definition.TitleFontData,
		definition.SubHeadingFontData,
		definition.ButtonFontData,
		definition.Scale
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledSmall", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.primary(): StyledSmallWrapper
	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))),
		Title = _Value("Title"),
		Buttons = _Value({}),
		Navigation = _Value(nil),
		Elevation = _Value(0),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.PRIMARY.STYLE,
		title = DEFAULTS.PRIMARY.TITLE,
		buttons = DEFAULTS.PRIMARY.BUTTONS,
		navigation = DEFAULTS.PRIMARY.NAVIGATION,
		elevation = DEFAULTS.PRIMARY.ELEVATION,
	}
	local inst: GuiObject = Source.primary(
		definition.Style,
		definition.Title,
		definition.Buttons,
		definition.Navigation,
		definition.Elevation
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledSmall", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.secondary(): StyledSmallWrapper
	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))),
		Title = _Value("Title"),
		Buttons = _Value({}),
		Navigation = _Value(nil),
		Elevation = _Value(0),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.SECONDARY.STYLE,
		title = DEFAULTS.SECONDARY.TITLE,
		buttons = DEFAULTS.SECONDARY.BUTTONS,
		navigation = DEFAULTS.SECONDARY.NAVIGATION,
		elevation = DEFAULTS.SECONDARY.ELEVATION,
	}
	local inst: GuiObject = Source.secondary(
		definition.Style,
		definition.Title,
		definition.Buttons,
		definition.Navigation,
		definition.Elevation
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledSmall", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.tertiary(): StyledSmallWrapper
	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))),
		Title = _Value("Title"),
		Buttons = _Value({}),
		Navigation = _Value(nil),
		Elevation = _Value(0),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.TERTIARY.STYLE,
		title = DEFAULTS.TERTIARY.TITLE,
		buttons = DEFAULTS.TERTIARY.BUTTONS,
		navigation = DEFAULTS.TERTIARY.NAVIGATION,
		elevation = DEFAULTS.TERTIARY.ELEVATION,
	}
	local inst: GuiObject = Source.tertiary(
		definition.Style,
		definition.Title,
		definition.Buttons,
		definition.Navigation,
		definition.Elevation
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledSmall", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

return Interface


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

-- Modules
local Types = require(_Package:WaitForChild("Types"))
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 Module = require(script.Parent:WaitForChild("ColdFusion"))

		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 = frame

		local function build(isDarkMode: boolean, color: Color3)
			local style = Style.new(
				1.4,
				Enum.Font.SourceSans,
				if isDarkMode then Enums.SchemeType.Dark else Enums.SchemeType.Light,
				color
			)

			local out = maid:GiveTask(
				Module.new(
					"Title",
					{
						Types.ButtonData.new(function()
							print("save click")
						end, Icons.save),
						Types.ButtonData.new(function()
							print("publish click")
						end, Icons.publish),
					},
					Types.ButtonData.new(function()
						print("nav click")
					end, Icons.arrow_back),
					style:GetColor(Enums.ColorRoleType.Primary),
					style:GetColor(Enums.ColorRoleType.OnPrimary),
					1,
					style.SchemeType,
					style:GetFontData(Enums.FontType.TitleLarge),
					style:GetFontData(Enums.FontType.HeadlineMedium),
					style:GetFontData(Enums.FontType.LabelLarge),
					style.Scale
				)
			)

			out.Position = UDim2.fromScale(0.5, 0.5)
			out.AnchorPoint = Vector2.new(0.5, 0.5)
			out.Size = UDim2.fromScale(1, 0)
			out.Parent = frame
		end
		build(false, Color3.fromHSV(0, 0.9, 0.8))
		build(true, Color3.fromHSV(0, 0.9, 0.8))
		build(false, Color3.fromHSV(0.6, 0.9, 0.7))
		build(true, Color3.fromHSV(0.6, 0.9, 0.7))
		build(false, Color3.fromHSV(0.35, 0.9, 0.7))
		-- build(true, Color3.fromHSV(0.35, 0.9, 0.7))
	end)
	return function()
		maid:Destroy()
	end
end


--!strict
local _Package = script.Parent.Parent.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
local SoundService = game:GetService("SoundService")

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

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

-- Types
type Maid = Maid.Maid
type Style = Style.Style
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type ImageData = Types.ImageData
type OptionData = Types.OptionData
type Signal = Signal.Signal
type RenderData = Types.RenderData
type FontData = Types.FontData

-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
local HEIGHT_DP = 40
local OUTLINE_WIDTH_DP = 1
local LABEL_ALIGNMENT = Enum.TextXAlignment.Center
local MIN_LEFT_RIGHT_PADDING_DP = 12
local ELEMENT_SEPARATION_PADDING_DP = 8
local TARGET_SIZE_DP = 48
local MAX_BUTTON_COUNT = 5
local ICON_SIZE_DP = 18
local CIRCLE_IMAGE_RECT = Rect.new(256, 256, 256, 256)
local RIGHT_CIRCLE_IMAGE = "rbxassetid://15562060748"
local LEFT_CIRCLE_IMAGE = "rbxassetid://15562057345"
local CENTER_IMAGE = "rbxassetid://14846394635"

-- Variables
-- References
-- Private Functions

-- Class
local Interface = {}

function newThemedComponent(
	themeDefaults: typeof(DEFAULTS.PRIMARY_CONTAINER),
	style: CanBeState<Style>,
	textColor: Enums.ColorRoleType,
	fillTextColor: Enums.ColorRoleType,
	fillBackgroundColor: Enums.ColorRoleType,
	outlineColor: Enums.ColorRoleType,
	options: CanBeState<{ OptionData }>,
	density: CanBeState<number?>,
	isMultiSelect: CanBeState<boolean?>,
	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, themeDefaults.STYLE)

	local out = Interface.new(
		options,
		_import(density, themeDefaults.DENSITY or 0),
		_import(isMultiSelect, themeDefaults.IS_MULTI_SELECT),
		_Computed(function(s: Style): Color3
			return s:GetColor(textColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(fillTextColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(fillBackgroundColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(outlineColor)
		end, styleState),
		_import(elevation, themeDefaults.ELEVATION),
		_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

Interface = {}

function Interface.primaryContainer(
	style: CanBeState<Style>,
	options: CanBeState<{ OptionData }>,
	density: CanBeState<number?>,
	isMultiSelect: CanBeState<boolean?>,
	elevation: CanBeState<number?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.PRIMARY_CONTAINER,
		style,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnPrimaryContainer,
		Enums.ColorRoleType.PrimaryContainer,
		Enums.ColorRoleType.Outline,
		options,
		density,
		isMultiSelect,
		elevation
	)
end

function Interface.secondaryContainer(
	style: CanBeState<Style>,
	options: CanBeState<{ OptionData }>,
	density: CanBeState<number?>,
	isMultiSelect: CanBeState<boolean?>,
	elevation: CanBeState<number?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.SECONDARY_CONTAINER,
		style,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnSecondaryContainer,
		Enums.ColorRoleType.SecondaryContainer,
		Enums.ColorRoleType.Outline,
		options,
		density,
		isMultiSelect,
		elevation
	)
end

function Interface.tertiaryContainer(
	style: CanBeState<Style>,
	options: CanBeState<{ OptionData }>,
	density: CanBeState<number?>,
	isMultiSelect: CanBeState<boolean?>,
	elevation: CanBeState<number?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.TERTIARY_CONTAINER,
		style,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnTertiaryContainer,
		Enums.ColorRoleType.TertiaryContainer,
		Enums.ColorRoleType.Outline,
		options,
		density,
		isMultiSelect,
		elevation
	)
end

function Interface.new(
	options: CanBeState<{ OptionData }>,
	density: CanBeState<number>,
	isMultiSelect: CanBeState<boolean>,
	textColor: CanBeState<Color3>,
	fillTextColor: CanBeState<Color3>,
	fillBackgroundColor: CanBeState<Color3>,
	outlineColor: 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, DEFAULTS.NEW.SCALE)
	local schemeTypeState: State<Enums.SchemeType> = _import(schemeType, DEFAULTS.NEW.SCHEME_TYPE)
	local fontDataState: State<FontData> = _import(fontData, DEFAULTS.NEW.FONT_DATA)

	local elevationState: State<number> = _import(elevation, DEFAULTS.NEW.ELEVATION or 0)
	local textColorState: State<Color3> = _import(textColor, DEFAULTS.NEW.TEXT_COLOR)
	local fillTextColorState: State<Color3> = _import(fillTextColor, DEFAULTS.NEW.FILL_TEXT_COLOR)
	local fillBackgroundColorState: State<Color3> =
		_import(fillBackgroundColor, DEFAULTS.NEW.FILL_BACKGROUND_COLOR)
	local outlineColorState: State<Color3> = _import(outlineColor, DEFAULTS.NEW.OUTLINE_COLOR)

	local renderDatasState: State<{ [Enums.ButtonStateType]: { [Enums.SelectionState]: RenderData } }> = _Computed(
		function(
			st: Enums.SchemeType,
			sc: number,
			f: FontData,
			e: number,
			tC: Color3,
			fTC: Color3,
			fBC: Color3,
			oC: Color3
		): { [Enums.ButtonStateType]: { [Enums.SelectionState]: RenderData } }
			e += 1
			return {
				[Enums.ButtonStateType.Enabled] = {
					[Enums.SelectionState.Selected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(oC, e, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fBC, e, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fTC, e, st), 0),
						f,
						nil,
						nil,
						nil
					),
					[Enums.SelectionState.Unselected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(oC, e, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fBC, e, st), 1),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 0),
						f,
						nil,
						nil,
						nil
					),
				},
				[Enums.ButtonStateType.Disabled] = {
					[Enums.SelectionState.Selected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 1 - 0.38),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 1 - 0.12),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 1 - 0.38),
						f,
						nil,
						nil,
						nil
					),
					[Enums.SelectionState.Unselected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 1 - 0.38),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 1 - 0.12),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e, st), 1 - 0.38),
						f,
						nil,
						nil,
						nil
					),
				},
				[Enums.ButtonStateType.Hovered] = {
					[Enums.SelectionState.Selected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(oC, e + 1, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fBC, e + 1, st), 1 - 0.08),
						Types._AppearanceData.new(Theme.getElevatedColor(fTC, e + 1, st), 0),
						f,
						nil,
						nil,
						nil
					),
					[Enums.SelectionState.Unselected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(oC, e + 1, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fBC, e + 1, st), 1 - 0.08),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e + 1, st), 0),
						f,
						nil,
						nil,
						nil
					),
				},
				[Enums.ButtonStateType.Focused] = {
					[Enums.SelectionState.Selected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(oC, e + 1, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fBC, e + 1, st), 1 - 0.1),
						Types._AppearanceData.new(Theme.getElevatedColor(fTC, e + 1, st), 0),
						f,
						nil,
						nil,
						nil
					),
					[Enums.SelectionState.Unselected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(oC, e + 1, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fBC, e + 1, st), 1 - 0.1),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e + 1, st), 0),
						f,
						nil,
						nil,
						nil
					),
				},
				[Enums.ButtonStateType.Pressed] = {
					[Enums.SelectionState.Selected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(oC, e - 1, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fBC, e - 1, st), 1 - 0.1),
						Types._AppearanceData.new(Theme.getElevatedColor(fTC, e - 1, st), 0),
						f,
						nil,
						Types._SoundData.new(Sounds.Library[Enums.SoundType.ui_tap_variant_01], 1),
						nil
					),
					[Enums.SelectionState.Unselected] = Types._RenderData.new(
						sc,
						Types._AppearanceData.new(Theme.getElevatedColor(oC, e - 1, st), 0),
						Types._AppearanceData.new(Theme.getElevatedColor(fBC, e - 1, st), 1 - 0.1),
						Types._AppearanceData.new(Theme.getElevatedColor(tC, e - 1, st), 0),
						f,
						nil,
						Types._SoundData.new(Sounds.Library[Enums.SoundType.ui_tap_variant_01], 1),
						nil
					),
				},
			}
		end,
		schemeTypeState,
		scaleState,
		fontDataState,
		elevationState,
		textColorState,
		fillTextColorState,
		fillBackgroundColorState,
		outlineColorState
	)

	local optionsState: State<{ OptionData }> = _import(options, {})

	local isMultiSelectState: State<boolean> = _import(isMultiSelect, false)

	local densityState: State<number> = _Computed(function(d: number)
		return math.clamp(d, -3, 0)
	end, _import(density, 0))

	local heightState = _Computed(function(s: number, d: number): number
		return s * (HEIGHT_DP + (d * 4))
	end, scaleState, densityState)

	local ratioState = _Computed(function(d: number): number
		return 3 * ((HEIGHT_DP - (d * 4)) / HEIGHT_DP)
	end, densityState)

	local inst = _new("Frame")({
		Size = _Computed(function(h: number): UDim2
			return UDim2.fromOffset(0, h)
		end, heightState),
		AutomaticSize = Enum.AutomaticSize.X,
		BackgroundTransparency = 1,
		Children = {
			_new("UIListLayout")({
				Padding = UDim.new(0, 0),
				SortOrder = Enum.SortOrder.LayoutOrder,
				FillDirection = Enum.FillDirection.Horizontal,
				HorizontalFlex = Enum.UIFlexAlignment.Fill,
				VerticalFlex = Enum.UIFlexAlignment.None,
				ItemLineAlignment = Enum.ItemLineAlignment.Center,
				VerticalAlignment = Enum.VerticalAlignment.Center,
				HorizontalAlignment = Enum.HorizontalAlignment.Center,
			}),
			_new("UICorner")({
				CornerRadius = UDim.new(1, 0),
			}),
			_new("UIStroke")({
				ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
				Color = _Computed(
					function(
						rDatas: { [Enums.ButtonStateType]: { [Enums.SelectionState]: RenderData } }
					): Color3
						return rDatas[Enums.ButtonStateType.Enabled][Enums.SelectionState.Unselected].Border.Color3
					end,
					renderDatasState
				),
				LineJoinMode = Enum.LineJoinMode.Round,
				Thickness = _Computed(function(s: number): number
					return math.max(s * OUTLINE_WIDTH_DP * 1, 1)
				end, scaleState),
				Transparency = _Computed(
					function(
						rDatas: { [Enums.ButtonStateType]: { [Enums.SelectionState]: RenderData } }
					): number
						return rDatas[Enums.ButtonStateType.Enabled][Enums.SelectionState.Unselected].Border.Transparency
					end,
					renderDatasState
				),
			}),
			_new("UISizeConstraint")({
				MaxSize = Vector2.new(math.huge, math.huge),
				MinSize = _Computed(function(s: number): Vector2
					return Vector2.new(s * MIN_LEFT_RIGHT_PADDING_DP * 2, 0)
				end, scaleState),
			}),
		},
	}) :: Frame

	local deselectAll = maid:GiveTask(Signal.new())

	for i = 1, MAX_BUTTON_COUNT do
		local optionDataState: State<OptionData?> = _Computed(function(o: { OptionData }): OptionData?
			return o[i]
		end, optionsState)

		local backgroundImageState = _Computed(function(o: { OptionData }): string
			if #o > MAX_BUTTON_COUNT then
				warn(`max of 5 buttons for segmented button bar, currently {#o} are defined`)
			end
			if #o == i then
				return RIGHT_CIRCLE_IMAGE
			elseif i == 1 then
				return LEFT_CIRCLE_IMAGE
			else
				return CENTER_IMAGE
			end
		end, optionsState)

		local isEnabledState = _Computed(function(optionData: OptionData?): boolean
			return if optionData then not optionData.Disabled else false
		end, optionDataState)

		local onClickState = _Computed(function(optionData: OptionData?): (boolean) -> ()
			return if optionData then optionData.OnSelect else function(isSelected: boolean) end
		end, optionDataState)

		local isFocusedState = _Value(false)
		local isPressedState = _Value(false)
		local isHoveredState = _Value(false)
		local clickCount = _Value(0)
		local isInitiallySelected = _Computed(function(optionData: OptionData?)
			clickCount:Set(0)
			return if optionData then optionData.IsInitiallySelected else false
		end, optionDataState)

		local isSelectedState = _Computed(function(count: number, initial: boolean): boolean
			return if count % 2 == 0 then initial else not initial
		end, clickCount, isInitiallySelected)

		maid:GiveTask(deselectAll:Connect(function(j: number)
			if j ~= i then
				if isSelectedState:Get() then
					clickCount:Set(clickCount:Get() + 1)
				end
			end
		end))

		local currentStateState = _Computed(
			function(
				isEnabled: boolean,
				isFocused: boolean,
				isPressed: boolean,
				isHovered: boolean
			): Enums.ButtonStateType
				if isEnabled 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 iconState = _Computed(function(optionData: OptionData?, isSelected: boolean): ImageData?
			return if optionData then if isSelected then optionData.SelectedIcon else optionData.Icon else nil
		end, optionDataState, isSelectedState)

		local textState = _Computed(function(optionData: OptionData?, isSelected: boolean): string
			return if optionData then if isSelected then optionData.SelectedText else optionData.Text else ""
		end, optionDataState, isSelectedState)

		local currentStyleState = _Computed(
			function(
				state: Enums.ButtonStateType,
				isSelected: boolean,
				rDatas: { [Enums.ButtonStateType]: { [Enums.SelectionState]: RenderData } }
			): RenderData
				local toggleStyle = rDatas[state]
				assert(toggleStyle ~= nil, `no style for {state}`)
				if isSelected then
					return toggleStyle[Enums.SelectionState.Selected]
				else
					return toggleStyle[Enums.SelectionState.Unselected]
				end
			end,
			currentStateState,
			isSelectedState,
			renderDatasState
		)

		local barSizeState = _Computed(function(s: number): UDim2
			return UDim2.new(0, s * OUTLINE_WIDTH_DP, 1, 0)
		end, scaleState)

		_new("Frame")({
			Visible = _Computed(function(data: OptionData?): boolean
				return i > 1 and data ~= nil
			end, optionDataState),
			LayoutOrder = i - 0.5,
			Size = barSizeState,
			BorderSizePixel = 0,
			BackgroundTransparency = _Computed(
				function(
					styleList: { [Enums.ButtonStateType]: { [Enums.SelectionState]: RenderData } }
				): number
					return styleList[Enums.ButtonStateType.Enabled][Enums.SelectionState.Unselected].Border.Transparency
				end,
				renderDatasState
			),
			BackgroundColor3 = _Computed(
				function(
					styleList: { [Enums.ButtonStateType]: { [Enums.SelectionState]: RenderData } }
				): Color3
					return styleList[Enums.ButtonStateType.Enabled][Enums.SelectionState.Unselected].Border.Color3
				end,
				renderDatasState
			),
			Parent = inst,
		})

		_new("ImageButton")({
			Visible = _Computed(function(data: OptionData?): boolean
				return data ~= nil
			end, optionDataState),
			Size = _Computed(function(o: { OptionData }, b: UDim2): UDim2
				local buttonCount = #o
				local avgBarReduction = b.X.Offset * (buttonCount - 1) / buttonCount
				return UDim2.new(1 / buttonCount, -avgBarReduction, 1, 0)
			end, optionsState, barSizeState),
			LayoutOrder = i,
			Parent = inst,
			BackgroundTransparency = 1,
			Image = backgroundImageState,
			ImageTransparency = _Computed(function(s: RenderData): number
				return s.Background.Transparency
			end, currentStyleState),
			ImageColor3 = _Computed(function(s: RenderData): Color3
				return s.Background.Color3
			end, currentStyleState),
			SliceCenter = CIRCLE_IMAGE_RECT,
			SliceScale = 1,
			ScaleType = Enum.ScaleType.Slice,
			AutomaticSize = Enum.AutomaticSize.None,
			Events = {
				Activated = function()
					if isEnabledState:Get() == false then
						return
					end
					local onClick = onClickState:Get()
					local count = clickCount:Get() + 1
					clickCount:Set(count)
					local initialSelect: boolean = isInitiallySelected:Get()

					do
						local cStyle: Types.RenderData = currentStyleState:Get()
						if cStyle.Sound then
							local sound = Instance.new("Sound")
							sound.Volume = cStyle.Sound.Volume
							sound.SoundId = cStyle.Sound.SoundId
							SoundService:PlayLocalSound(sound)
							sound:Destroy()
						end
					end

					if isMultiSelectState:Get() == false then
						deselectAll:Fire(i)
					end

					if count % 2 == 0 then
						onClick(initialSelect)
					else
						onClick(not initialSelect)
					end
				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 = {
				_new("UIAspectRatioConstraint")({
					AspectRatio = ratioState,
					AspectType = Enum.AspectType.ScaleWithParentSize,
					DominantAxis = Enum.DominantAxis.Height,
				}),
				_new("UIListLayout")({
					Padding = _Computed(function(s: number): UDim
						return UDim.new(0, s * ELEMENT_SEPARATION_PADDING_DP)
					end, scaleState),
					SortOrder = Enum.SortOrder.LayoutOrder,
					FillDirection = Enum.FillDirection.Horizontal,
					ItemLineAlignment = Enum.ItemLineAlignment.Center,
					VerticalAlignment = Enum.VerticalAlignment.Center,
					HorizontalAlignment = Enum.HorizontalAlignment.Center,
				}),
				_new("TextLabel")({
					Text = textState,
					Visible = _Computed(function(txt: string): boolean
						return txt:len() > 0
					end, textState),
					TextScaled = true,
					TextXAlignment = LABEL_ALIGNMENT,
					TextYAlignment = Enum.TextYAlignment.Center,
					BackgroundTransparency = 1,
					AutomaticSize = Enum.AutomaticSize.X,
					FontFace = _Computed(function(f: FontData): Font
						return f.Font
					end, fontDataState),
					LayoutOrder = 2,
					TextColor3 = _Computed(function(s: RenderData): Color3
						return if s.Text then s.Text.Color3 else Color3.new(1, 1, 1)
					end, currentStyleState),
					TextTransparency = _Computed(function(s: RenderData): number
						return if s.Text then s.Text.Transparency else 1
					end, currentStyleState),

					SizeConstraint = Enum.SizeConstraint.RelativeYY,

					Size = _Computed(function(s: number): UDim2
						return UDim2.fromScale(0, 1) --s * ICON_SIZE_DP)
					end, scaleState),
				}),
				_new("ImageLabel")({
					Name = "Icon",
					LayoutOrder = 1,
					BackgroundTransparency = 1,
					Visible = _Computed(function(icon: ImageData?): boolean
						return icon ~= nil
					end, iconState),
					Image = _Computed(function(icon: ImageData?): string
						return if icon then icon.Image else ""
					end, iconState),
					ImageColor3 = _Computed(function(icon: ImageData?, s: RenderData?): Color3
						return if icon and s and s.Text then s.Text.Color3 else Color3.new(1, 1, 1)
					end, iconState, currentStyleState),
					ImageRectOffset = _Computed(function(icon: ImageData?): Vector2
						return if icon then icon.ImageRectOffset else Vector2.zero
					end, iconState),
					ImageRectSize = _Computed(function(icon: ImageData?): Vector2
						return if icon then icon.ImageRectSize else Vector2.zero
					end, iconState),
					ImageTransparency = _Computed(function(icon: ImageData?, s: RenderData?): number
						return if icon and s and s.Text then s.Text.Transparency else 1
					end, iconState, currentStyleState),
					SizeConstraint = Enum.SizeConstraint.RelativeYY,
					Size = _Computed(function(s: number): UDim2
						return UDim2.fromScale(1, 1)
						-- return UDim2.fromOffset(s * ICON_SIZE_DP, s * ICON_SIZE_DP)
					end, scaleState),
				}),
				-- _new("UICorner")({
				-- 	CornerRadius = UDim.new(1, 0),
				-- }),
				_new("UISizeConstraint")({
					MaxSize = Vector2.new(math.huge, math.huge),
					MinSize = _Computed(function(s: number): Vector2
						return Vector2.new(s * TARGET_SIZE_DP, 0)
					end, scaleState),
				}),
				_new("UIPadding")({
					PaddingLeft = _Computed(function(s: number): UDim
						return UDim.new(0, s * (MIN_LEFT_RIGHT_PADDING_DP + ELEMENT_SEPARATION_PADDING_DP))
					end, scaleState),
					PaddingRight = _Computed(function(s: number): UDim
						return UDim.new(0, s * (MIN_LEFT_RIGHT_PADDING_DP + ELEMENT_SEPARATION_PADDING_DP))
					end, scaleState),
					PaddingTop = _Computed(function(s: number, h: number): UDim
						return UDim.new(0, (h - s * ICON_SIZE_DP) / 2)
					end, scaleState, heightState),
					PaddingBottom = _Computed(function(s: number, h: number): UDim
						return UDim.new(0, (h - s * ICON_SIZE_DP) / 2)
					end, scaleState, heightState),
				}),
			},
		})
	end

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

	return inst
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.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 = {
		OPTIONS = {},
		DENSITY = 0,
		IS_MULTI_SELECT = false,
		TEXT_COLOR = Color3.new(),
		FILL_TEXT_COLOR = Color3.new(),
		FILL_BACKGROUND_COLOR = Color3.new(),
		OUTLINE_COLOR = Color3.new(),
		ELEVATION = 0,
		SCHEME_TYPE = Enums.SchemeType.Light,
		FONT_DATA = Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14),
		SCALE = 1,
	},
	PRIMARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		OPTIONS = {},
		DENSITY = 0,
		IS_MULTI_SELECT = false,
		ELEVATION = 0,
	},
	SECONDARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		OPTIONS = {},
		DENSITY = 0,
		IS_MULTI_SELECT = false,
		ELEVATION = 0,
	},
	TERTIARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		OPTIONS = {},
		DENSITY = 0,
		IS_MULTI_SELECT = false,
		ELEVATION = 0,
	},
}


--!strict
-- this script was generated by the build system, please do not make manual edits
local _Package = script.Parent.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(
	options: FusionCanBeState<{ OptionData }>,
	density: FusionCanBeState<number>,
	isMultiSelect: FusionCanBeState<boolean>,
	textColor: FusionCanBeState<Color3>,
	fillTextColor: FusionCanBeState<Color3>,
	fillBackgroundColor: FusionCanBeState<Color3>,
	outlineColor: 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(options, DEFAULTS.NEW.OPTIONS),
		convert(density, DEFAULTS.NEW.DENSITY),
		convert(isMultiSelect, DEFAULTS.NEW.IS_MULTI_SELECT),
		convert(textColor, DEFAULTS.NEW.TEXT_COLOR),
		convert(fillTextColor, DEFAULTS.NEW.FILL_TEXT_COLOR),
		convert(fillBackgroundColor, DEFAULTS.NEW.FILL_BACKGROUND_COLOR),
		convert(outlineColor, DEFAULTS.NEW.OUTLINE_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.primaryContainer(
	style: FusionCanBeState<Style>,
	options: FusionCanBeState<{ OptionData }>,
	density: FusionCanBeState<number?>,
	isMultiSelect: FusionCanBeState<boolean?>,
	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(options, DEFAULTS.PRIMARY_CONTAINER.OPTIONS),
		convert(density, DEFAULTS.PRIMARY_CONTAINER.DENSITY),
		convert(isMultiSelect, DEFAULTS.PRIMARY_CONTAINER.IS_MULTI_SELECT),
		convert(elevation, DEFAULTS.PRIMARY_CONTAINER.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.secondaryContainer(
	style: FusionCanBeState<Style>,
	options: FusionCanBeState<{ OptionData }>,
	density: FusionCanBeState<number?>,
	isMultiSelect: FusionCanBeState<boolean?>,
	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(options, DEFAULTS.SECONDARY_CONTAINER.OPTIONS),
		convert(density, DEFAULTS.SECONDARY_CONTAINER.DENSITY),
		convert(isMultiSelect, DEFAULTS.SECONDARY_CONTAINER.IS_MULTI_SELECT),
		convert(elevation, DEFAULTS.SECONDARY_CONTAINER.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.tertiaryContainer(
	style: FusionCanBeState<Style>,
	options: FusionCanBeState<{ OptionData }>,
	density: FusionCanBeState<number?>,
	isMultiSelect: FusionCanBeState<boolean?>,
	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(options, DEFAULTS.TERTIARY_CONTAINER.OPTIONS),
		convert(density, DEFAULTS.TERTIARY_CONTAINER.DENSITY),
		convert(isMultiSelect, DEFAULTS.TERTIARY_CONTAINER.IS_MULTI_SELECT),
		convert(elevation, DEFAULTS.TERTIARY_CONTAINER.ELEVATION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
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.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))

local React = require(_Packages:WaitForChild("React"))
local ReactRoblox = require(_Packages:WaitForChild("ReactRoblox"))

-- 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 NewMenuRowSegmented = React.Component:extend("NewMenuRowSegmented")
	NewMenuRowSegmented.defaultProps = {
		options = DEFAULTS.NEW.OPTIONS,
		density = DEFAULTS.NEW.DENSITY,
		isMultiSelect = DEFAULTS.NEW.IS_MULTI_SELECT,
		textColor = DEFAULTS.NEW.TEXT_COLOR,
		fillTextColor = DEFAULTS.NEW.FILL_TEXT_COLOR,
		fillBackgroundColor = DEFAULTS.NEW.FILL_BACKGROUND_COLOR,
		outlineColor = DEFAULTS.NEW.OUTLINE_COLOR,
		elevation = DEFAULTS.NEW.ELEVATION,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		fontData = DEFAULTS.NEW.FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewMenuRowSegmented:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			options = _Value(self.defaultProps.options),
			density = _Value(self.defaultProps.density),
			isMultiSelect = _Value(self.defaultProps.isMultiSelect),
			textColor = _Value(self.defaultProps.textColor),
			fillTextColor = _Value(self.defaultProps.fillTextColor),
			fillBackgroundColor = _Value(self.defaultProps.fillBackgroundColor),
			outlineColor = _Value(self.defaultProps.outlineColor),
			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.options,
			self._internalStates.density,
			self._internalStates.isMultiSelect,
			self._internalStates.textColor,
			self._internalStates.fillTextColor,
			self._internalStates.fillBackgroundColor,
			self._internalStates.outlineColor,
			self._internalStates.elevation,
			self._internalStates.schemeType,
			self._internalStates.fontData,
			self._internalStates.scale
		)
	end

	function NewMenuRowSegmented: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 React.createElement(ReactRoblox.createPortal, props)
	end
	function NewMenuRowSegmented:componentDidMount()
		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 NewMenuRowSegmented:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.New = NewMenuRowSegmented
end

do
	local PrimaryContainerMenuRowSegmented = React.Component:extend("PrimaryContainerMenuRowSegmented")
	PrimaryContainerMenuRowSegmented.defaultProps = {
		style = DEFAULTS.PRIMARY_CONTAINER.STYLE,
		options = DEFAULTS.PRIMARY_CONTAINER.OPTIONS,
		density = DEFAULTS.PRIMARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.PRIMARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.PRIMARY_CONTAINER.ELEVATION,
	}
	function PrimaryContainerMenuRowSegmented: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),
			options = _Value(self.defaultProps.options),
			density = _Value(self.defaultProps.density),
			isMultiSelect = _Value(self.defaultProps.isMultiSelect),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.options,
			self._internalStates.density,
			self._internalStates.isMultiSelect,
			self._internalStates.elevation
		)
	end

	function PrimaryContainerMenuRowSegmented: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 React.createElement(ReactRoblox.createPortal, props)
	end
	function PrimaryContainerMenuRowSegmented:componentDidMount()
		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 PrimaryContainerMenuRowSegmented:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.PrimaryContainer = PrimaryContainerMenuRowSegmented
end

do
	local SecondaryContainerMenuRowSegmented = React.Component:extend("SecondaryContainerMenuRowSegmented")
	SecondaryContainerMenuRowSegmented.defaultProps = {
		style = DEFAULTS.SECONDARY_CONTAINER.STYLE,
		options = DEFAULTS.SECONDARY_CONTAINER.OPTIONS,
		density = DEFAULTS.SECONDARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.SECONDARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.SECONDARY_CONTAINER.ELEVATION,
	}
	function SecondaryContainerMenuRowSegmented: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),
			options = _Value(self.defaultProps.options),
			density = _Value(self.defaultProps.density),
			isMultiSelect = _Value(self.defaultProps.isMultiSelect),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.options,
			self._internalStates.density,
			self._internalStates.isMultiSelect,
			self._internalStates.elevation
		)
	end

	function SecondaryContainerMenuRowSegmented: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 React.createElement(ReactRoblox.createPortal, props)
	end
	function SecondaryContainerMenuRowSegmented:componentDidMount()
		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 SecondaryContainerMenuRowSegmented:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.SecondaryContainer = SecondaryContainerMenuRowSegmented
end

do
	local TertiaryContainerMenuRowSegmented = React.Component:extend("TertiaryContainerMenuRowSegmented")
	TertiaryContainerMenuRowSegmented.defaultProps = {
		style = DEFAULTS.TERTIARY_CONTAINER.STYLE,
		options = DEFAULTS.TERTIARY_CONTAINER.OPTIONS,
		density = DEFAULTS.TERTIARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.TERTIARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.TERTIARY_CONTAINER.ELEVATION,
	}
	function TertiaryContainerMenuRowSegmented: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),
			options = _Value(self.defaultProps.options),
			density = _Value(self.defaultProps.density),
			isMultiSelect = _Value(self.defaultProps.isMultiSelect),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.options,
			self._internalStates.density,
			self._internalStates.isMultiSelect,
			self._internalStates.elevation
		)
	end

	function TertiaryContainerMenuRowSegmented: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 React.createElement(ReactRoblox.createPortal, props)
	end
	function TertiaryContainerMenuRowSegmented:componentDidMount()
		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 TertiaryContainerMenuRowSegmented:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.TertiaryContainer = TertiaryContainerMenuRowSegmented
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.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 NewMenuRowSegmented = Roact.Component:extend("NewMenuRowSegmented")
	NewMenuRowSegmented.defaultProps = {
		options = DEFAULTS.NEW.OPTIONS,
		density = DEFAULTS.NEW.DENSITY,
		isMultiSelect = DEFAULTS.NEW.IS_MULTI_SELECT,
		textColor = DEFAULTS.NEW.TEXT_COLOR,
		fillTextColor = DEFAULTS.NEW.FILL_TEXT_COLOR,
		fillBackgroundColor = DEFAULTS.NEW.FILL_BACKGROUND_COLOR,
		outlineColor = DEFAULTS.NEW.OUTLINE_COLOR,
		elevation = DEFAULTS.NEW.ELEVATION,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		fontData = DEFAULTS.NEW.FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewMenuRowSegmented:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			options = _Value(self.defaultProps.options),
			density = _Value(self.defaultProps.density),
			isMultiSelect = _Value(self.defaultProps.isMultiSelect),
			textColor = _Value(self.defaultProps.textColor),
			fillTextColor = _Value(self.defaultProps.fillTextColor),
			fillBackgroundColor = _Value(self.defaultProps.fillBackgroundColor),
			outlineColor = _Value(self.defaultProps.outlineColor),
			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.options,
			self._internalStates.density,
			self._internalStates.isMultiSelect,
			self._internalStates.textColor,
			self._internalStates.fillTextColor,
			self._internalStates.fillBackgroundColor,
			self._internalStates.outlineColor,
			self._internalStates.elevation,
			self._internalStates.schemeType,
			self._internalStates.fontData,
			self._internalStates.scale
		)
	end

	function NewMenuRowSegmented: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 NewMenuRowSegmented: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 NewMenuRowSegmented:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.New = NewMenuRowSegmented
end

do
	local PrimaryContainerMenuRowSegmented = Roact.Component:extend("PrimaryContainerMenuRowSegmented")
	PrimaryContainerMenuRowSegmented.defaultProps = {
		style = DEFAULTS.PRIMARY_CONTAINER.STYLE,
		options = DEFAULTS.PRIMARY_CONTAINER.OPTIONS,
		density = DEFAULTS.PRIMARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.PRIMARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.PRIMARY_CONTAINER.ELEVATION,
	}
	function PrimaryContainerMenuRowSegmented: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),
			options = _Value(self.defaultProps.options),
			density = _Value(self.defaultProps.density),
			isMultiSelect = _Value(self.defaultProps.isMultiSelect),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.options,
			self._internalStates.density,
			self._internalStates.isMultiSelect,
			self._internalStates.elevation
		)
	end

	function PrimaryContainerMenuRowSegmented: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 PrimaryContainerMenuRowSegmented: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 PrimaryContainerMenuRowSegmented:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.PrimaryContainer = PrimaryContainerMenuRowSegmented
end

do
	local SecondaryContainerMenuRowSegmented = Roact.Component:extend("SecondaryContainerMenuRowSegmented")
	SecondaryContainerMenuRowSegmented.defaultProps = {
		style = DEFAULTS.SECONDARY_CONTAINER.STYLE,
		options = DEFAULTS.SECONDARY_CONTAINER.OPTIONS,
		density = DEFAULTS.SECONDARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.SECONDARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.SECONDARY_CONTAINER.ELEVATION,
	}
	function SecondaryContainerMenuRowSegmented: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),
			options = _Value(self.defaultProps.options),
			density = _Value(self.defaultProps.density),
			isMultiSelect = _Value(self.defaultProps.isMultiSelect),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.options,
			self._internalStates.density,
			self._internalStates.isMultiSelect,
			self._internalStates.elevation
		)
	end

	function SecondaryContainerMenuRowSegmented: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 SecondaryContainerMenuRowSegmented: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 SecondaryContainerMenuRowSegmented:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.SecondaryContainer = SecondaryContainerMenuRowSegmented
end

do
	local TertiaryContainerMenuRowSegmented = Roact.Component:extend("TertiaryContainerMenuRowSegmented")
	TertiaryContainerMenuRowSegmented.defaultProps = {
		style = DEFAULTS.TERTIARY_CONTAINER.STYLE,
		options = DEFAULTS.TERTIARY_CONTAINER.OPTIONS,
		density = DEFAULTS.TERTIARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.TERTIARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.TERTIARY_CONTAINER.ELEVATION,
	}
	function TertiaryContainerMenuRowSegmented: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),
			options = _Value(self.defaultProps.options),
			density = _Value(self.defaultProps.density),
			isMultiSelect = _Value(self.defaultProps.isMultiSelect),
			elevation = _Value(self.defaultProps.elevation),
		}
		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.options,
			self._internalStates.density,
			self._internalStates.isMultiSelect,
			self._internalStates.elevation
		)
	end

	function TertiaryContainerMenuRowSegmented: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 TertiaryContainerMenuRowSegmented: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 TertiaryContainerMenuRowSegmented:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.TertiaryContainer = TertiaryContainerMenuRowSegmented
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.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 SegmentedWrapperDefinition = {
	Options: { OptionData },
	Density: number,
	IsMultiSelect: boolean,
	TextColor: Color3,
	FillTextColor: Color3,
	FillBackgroundColor: Color3,
	OutlineColor: Color3,
	Elevation: number,
	SchemeType: Enums.SchemeType,
	FontData: FontData,
	Scale: number,
}
export type SegmentedWrapper = Wrapper<GuiObject, SegmentedWrapperDefinition, "Segmented">

export type StyledSegmentedWrapperDefinition = {
	Style: Style,
	Options: { OptionData },
	Density: number?,
	IsMultiSelect: boolean?,
	Elevation: number?,
}
export type StyledSegmentedWrapper = Wrapper<GuiObject, StyledSegmentedWrapperDefinition, "StyledSegmented">
-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
-- Variables
-- References
-- Private Functions
-- Interface
local Interface = {}

function Interface.new(): StyledSegmentedWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Options = _Value({}),
		Density = _Value(0),
		IsMultiSelect = _Value(false),
		TextColor = _Value(Color3.new()),
		FillTextColor = _Value(Color3.new()),
		FillBackgroundColor = _Value(Color3.new()),
		OutlineColor = _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? } = {
		options = DEFAULTS.NEW.OPTIONS,
		density = DEFAULTS.NEW.DENSITY,
		isMultiSelect = DEFAULTS.NEW.IS_MULTI_SELECT,
		textColor = DEFAULTS.NEW.TEXT_COLOR,
		fillTextColor = DEFAULTS.NEW.FILL_TEXT_COLOR,
		fillBackgroundColor = DEFAULTS.NEW.FILL_BACKGROUND_COLOR,
		outlineColor = DEFAULTS.NEW.OUTLINE_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.Options,
		definition.Density,
		definition.IsMultiSelect,
		definition.TextColor,
		definition.FillTextColor,
		definition.FillBackgroundColor,
		definition.OutlineColor,
		definition.Elevation,
		definition.SchemeType,
		definition.FontData,
		definition.Scale
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledSegmented", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.primaryContainer(): StyledSegmentedWrapper
	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))),
		Options = _Value({}),
		Density = _Value(0),
		IsMultiSelect = _Value(false),
		Elevation = _Value(0),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.PRIMARY_CONTAINER.STYLE,
		options = DEFAULTS.PRIMARY_CONTAINER.OPTIONS,
		density = DEFAULTS.PRIMARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.PRIMARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.PRIMARY_CONTAINER.ELEVATION,
	}
	local inst: GuiObject = Source.primaryContainer(
		definition.Style,
		definition.Options,
		definition.Density,
		definition.IsMultiSelect,
		definition.Elevation
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledSegmented", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.secondaryContainer(): StyledSegmentedWrapper
	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))),
		Options = _Value({}),
		Density = _Value(0),
		IsMultiSelect = _Value(false),
		Elevation = _Value(0),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.SECONDARY_CONTAINER.STYLE,
		options = DEFAULTS.SECONDARY_CONTAINER.OPTIONS,
		density = DEFAULTS.SECONDARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.SECONDARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.SECONDARY_CONTAINER.ELEVATION,
	}
	local inst: GuiObject = Source.secondaryContainer(
		definition.Style,
		definition.Options,
		definition.Density,
		definition.IsMultiSelect,
		definition.Elevation
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledSegmented", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.tertiaryContainer(): StyledSegmentedWrapper
	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))),
		Options = _Value({}),
		Density = _Value(0),
		IsMultiSelect = _Value(false),
		Elevation = _Value(0),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.TERTIARY_CONTAINER.STYLE,
		options = DEFAULTS.TERTIARY_CONTAINER.OPTIONS,
		density = DEFAULTS.TERTIARY_CONTAINER.DENSITY,
		isMultiSelect = DEFAULTS.TERTIARY_CONTAINER.IS_MULTI_SELECT,
		elevation = DEFAULTS.TERTIARY_CONTAINER.ELEVATION,
	}
	local inst: GuiObject = Source.tertiaryContainer(
		definition.Style,
		definition.Options,
		definition.Density,
		definition.IsMultiSelect,
		definition.Elevation
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledSegmented", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

return Interface


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

-- Modules
local Types = require(_Package:WaitForChild("Types"))
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"))

			local options = {
				Types.OptionData.new(function(onSelected: boolean)
					print("select 1", onSelected)
				end, false, true, "Unselected 1", Icons.gamepad, "Selected 1", Icons.handyman),
				Types.OptionData.new(function(onSelected: boolean)
					print("select 2", onSelected)
				end, false, false, "Selected 2", Icons.track_changes),
				Types.OptionData.new(function(onSelected: boolean)
					print("select 3", onSelected)
				end, true, false, "Disabled 3", Icons.badge),
				Types.OptionData.new(function(onSelected: boolean)
					print("select 4", onSelected)
				end, false, false, "Selected 4"),
				Types.OptionData.new(function(onSelected: boolean)
					print("select 5", onSelected)
				end, false, false, "Unselected 5", nil, "Selected 5", nil),
			}

			do
				local button = maid:GiveTask(
					Module.new(
						options,
						0,
						false,
						style:GetColor(Enums.ColorRoleType.OnSurface),
						style:GetColor(Enums.ColorRoleType.OnSecondaryContainer),
						style:GetColor(Enums.ColorRoleType.SecondaryContainer),
						style:GetColor(Enums.ColorRoleType.Outline),
						0,
						style.SchemeType,
						style:GetFontData(Enums.FontType.LabelLarge),
						style.Scale
					)
				)
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(
					Module.new(
						options,
						-2,
						true,
						style:GetColor(Enums.ColorRoleType.OnSurface),
						style:GetColor(Enums.ColorRoleType.OnSecondaryContainer),
						style:GetColor(Enums.ColorRoleType.SecondaryContainer),
						style:GetColor(Enums.ColorRoleType.Outline),
						0,
						style.SchemeType,
						style:GetFontData(Enums.FontType.LabelLarge),
						style.Scale
					)
				)
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(
					Module.new(
						options,
						-4,
						true,
						style:GetColor(Enums.ColorRoleType.OnSurface),
						style:GetColor(Enums.ColorRoleType.OnSecondaryContainer),
						style:GetColor(Enums.ColorRoleType.SecondaryContainer),
						style:GetColor(Enums.ColorRoleType.Outline),
						0,
						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(1, width * 0.5)
			dark.Position = UDim2.fromScale(0, x)
			dark.Parent = frame

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


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

-- Modules
local Types = require(_Package:WaitForChild("Types"))
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(
				0.75,
				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"))

			local options = {
				Types.OptionData.new(function(onSelected: boolean)
					print("select 1", onSelected)
				end, false, true, "Unselected 1", Icons.gamepad, "Selected 1", Icons.handyman),
				Types.OptionData.new(function(onSelected: boolean)
					print("select 2", onSelected)
				end, false, false, "Selected 2", Icons.track_changes),
				Types.OptionData.new(function(onSelected: boolean)
					print("select 3", onSelected)
				end, true, false, "Selected 3", Icons.badge),
				Types.OptionData.new(function(onSelected: boolean)
					print("select 4", onSelected)
				end, false, false, "Selected 4"),
				Types.OptionData.new(function(onSelected: boolean)
					print("select 5", onSelected)
				end, false, false, "Unselected 5", nil, "Selected 5", nil),
			}

			do
				local button = maid:GiveTask(Module.primaryContainer(style, options))
				button.Parent = halfFrame
			end
			do
				local button = maid:GiveTask(Module.secondaryContainer(style, options))
				button.Parent = halfFrame
			end

			do
				local button = maid:GiveTask(Module.tertiaryContainer(style, options))
				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(1, width * 0.5)
			dark.Position = UDim2.fromScale(0, x)
			dark.Parent = frame

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