--!strict
-- inspired by the technique used here: https://devforum.roblox.com/t/circular-progression-module-for-all-your-ui-needs/1004470
local _Package = script.Parent.Parent.Parent.Parent
local _Packages = _Package.Parent

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

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

-- 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 State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type AppearanceData = Types.AppearanceData
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"))
local DIAMETER_DP = 36 --48
local RING_ASSET_URL = "rbxassetid://3587367081"
local ROTATION_OFFSET = 180
local BUFFER = 10
local USE_EDITABLE_IMAGE = false -- RunService:IsStudio()
local EDIT_IMG_WIDTH = 48
local DEBUG_ENABLED = false
-- Variables
-- References
-- Private Functions
function tickAlpha(period: number, offset: number?): number
	offset = offset or 0
	assert(offset)
	return ((tick() - offset) % period) / period
end
function tickCycle(period: number, offset: number?): number
	return math.cos(math.rad(360) * tickAlpha(period, offset))
end
function newSemiRotaryElement(
	maid: Maid,
	progressStartState: State<number>,
	progressFinishState: State<number>,
	colorState: State<Color3>,
	transparencyState: State<number>
): GuiObject
	local _fuse = ColdFusion.fuse(maid)

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

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

	local out = _new("CanvasGroup")({
		Size = UDim2.fromScale(1, 1),
		AnchorPoint = Vector2.new(0.5, 0.5),
		Position = UDim2.fromScale(0.5, 0.5),
		BackgroundTransparency = 1,
		Children = {
			_new("UIGradient")({
				Transparency = NumberSequence.new({
					NumberSequenceKeypoint.new(0, 0),
					NumberSequenceKeypoint.new(0.499, 0),
					NumberSequenceKeypoint.new(0.5, 1),
					NumberSequenceKeypoint.new(1, 1),
				}),
				Rotation = _Computed(function(start: number): number
					return (start + ROTATION_OFFSET) % 360
				end, progressStartState),
			}),
			_new("ImageLabel")({
				Image = RING_ASSET_URL,
				ImageColor3 = colorState,
				ImageTransparency = transparencyState,
				BackgroundTransparency = 1,
				Size = UDim2.fromScale(1, 1),
				Position = UDim2.fromScale(0.5, 0.5),
				AnchorPoint = Vector2.new(0.5, 0.5),
				Children = {
					_new("UIGradient")({
						Transparency = NumberSequence.new({
							NumberSequenceKeypoint.new(0, 1),
							NumberSequenceKeypoint.new(0.499, 1),
							NumberSequenceKeypoint.new(0.5, 0),
							NumberSequenceKeypoint.new(1, 0),
						}),
						Rotation = _Computed(function(finish: number): number
							return (finish + ROTATION_OFFSET) % 360
						end, progressFinishState),
					}),
				},
			}),
		},
	}) :: GuiObject

	return out
end

function newRotaryElement(
	maid: Maid,
	progressStartState: State<number>,
	progressWidthState: State<number>,
	colorState: State<Color3>,
	transparencyState: State<number>
): GuiObject
	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 progressFinishState = _Computed(function(start: number, width: number): number
		return (start + width) % 360
	end, progressStartState, progressWidthState)
	local progressMidState = _Computed(function(start: number, width: number): number
		return (start + width * 0.5) % 360
	end, progressStartState, progressWidthState)

	return _new("Frame")({
		Size = UDim2.fromScale(1, 1),
		AnchorPoint = Vector2.new(0.5, 0.5),
		Position = UDim2.fromScale(0.5, 0.5),
		BackgroundTransparency = 1,
		Children = {
			newSemiRotaryElement(maid, progressStartState, progressMidState, colorState, transparencyState),
			newSemiRotaryElement(maid, progressMidState, progressFinishState, colorState, transparencyState),
		},
	}) :: GuiObject
end

-- Class
local Interface = {}

function Interface.primary(
	style: CanBeState<Style>,
	progress: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

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

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

	local styleState: State<Style> = _import(style, DEFAULTS.PRIMARY.STYLE)
	local isEnabledState = _import(isEnabled, DEFAULTS.PRIMARY.IS_ENABLED)
	local out = Interface.new(
		_import(progress, DEFAULTS.PRIMARY.PROGRESS),
		isEnabledState,
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.Primary)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.PrimaryContainer)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)

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

	return out
end

function Interface.secondary(
	style: CanBeState<Style>,
	progress: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

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

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

	local styleState: State<Style> = _import(style, DEFAULTS.SECONDARY.STYLE)
	local isEnabledState = _import(isEnabled, DEFAULTS.SECONDARY.IS_ENABLED)
	local out = Interface.new(
		_import(progress, DEFAULTS.SECONDARY.PROGRESS),
		isEnabledState,
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.Secondary)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.SecondaryContainer)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)

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

	return out
end

function Interface.tertiary(
	style: CanBeState<Style>,
	progress: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	local maid = Maid.new()

	local _fuse = ColdFusion.fuse(maid)

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

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

	local styleState: State<Style> = _import(style, DEFAULTS.TERTIARY.STYLE)
	local isEnabledState = _import(isEnabled, DEFAULTS.TERTIARY.IS_ENABLED)
	local out = Interface.new(
		_import(progress, DEFAULTS.TERTIARY.PROGRESS),
		isEnabledState,
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.Tertiary)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(Enums.ColorRoleType.TertiaryContainer)
		end, styleState),
		_Computed(function(s: Style): number
			return s.Scale
		end, styleState)
	)

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

	return out
end

function Interface.new(
	progress: CanBeState<number?>,
	isEnabled: CanBeState<boolean>,
	fillColor: CanBeState<Color3>,
	emptyColor: CanBeState<Color3>,
	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 inputProgressState: State<number?> = _import(progress, DEFAULTS.NEW.PROGRESS)
	local isEnabledState = _import(isEnabled, DEFAULTS.NEW.IS_ENABLED)
	local fillColorState = _import(fillColor, DEFAULTS.NEW.FILL_COLOR)
	local emptyColorState = _import(emptyColor, DEFAULTS.NEW.EMPTY_COLOR)

	local transparencyState = _Computed(function(isEnab: boolean): number
		return if isEnab then 0 else 1
	end, isEnabledState):Tween(0.3, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut)

	local progressStartState = _Value(0)
	local progressWidthState = _Value(0)

	local startSpring = Spring.new(30, 40, 0)
	local widthSpring = Spring.new(70, 80, 0)

	maid:GiveTask(RunService.RenderStepped:Connect(function(deltaTime: number)
		if inputProgressState:Get() ~= nil then
			local inputProgress = inputProgressState:Get()
			assert(inputProgress)
			startSpring:Set(0)
			widthSpring:Set(inputProgress * 360)
		else
			local start = (360 * tickAlpha(2)) % 360
			local width = (180 + 140 * tickCycle(5)) % 360

			startSpring:Set(start)
			widthSpring:Set(width)
		end

		if startSpring.Position - 180 > startSpring.Goal then
			startSpring.Position -= 360
		elseif startSpring.Position + 180 < startSpring.Goal then
			startSpring.Position += 360
		end

		-- if widthSpring.Position-180 > widthSpring.Goal then
		-- 	widthSpring.Position -= 360
		-- end

		startSpring:Step(deltaTime)
		widthSpring:Step(deltaTime)

		progressStartState:Set(startSpring:Get() % 360)
		progressWidthState:Set(widthSpring:Get() % 360)
	end))
	local editableImage = maid:GiveTask(Instance.new("EditableImage"))

	local imageLabel: GuiObject?

	if USE_EDITABLE_IMAGE then
		imageLabel = _new("ImageLabel")({
			Size = UDim2.fromScale(1, 1),
			AnchorPoint = Vector2.new(0.5, 0.5),
			Position = UDim2.fromScale(0.5, 0.5),
			BackgroundTransparency = 1,
			Children = {
				editableImage,
			},
		}) :: GuiObject
	end

	local out = _new("Frame")({
		Size = _Computed(function(sc: number): UDim2
			return UDim2.fromOffset(sc * DIAMETER_DP, sc * DIAMETER_DP)
		end, scaleState),
		AnchorPoint = Vector2.new(0.5, 0.5),
		Position = UDim2.fromScale(0.5, 0.5),
		BackgroundTransparency = 1,
		-- BackgroundColor3 = Color3.new(0.5,0.5,0.5),
		Children = if USE_EDITABLE_IMAGE
			then { imageLabel }
			else {
				_bind(
					newRotaryElement(
						maid,
						progressStartState,
						progressWidthState,
						fillColorState,
						transparencyState
					)
				)({
					ZIndex = 2,
					Name = "Fill",
				}),
				_bind(newRotaryElement(
					maid,
					_Computed(function(start: number, width: number): number
						return (start + width + BUFFER) % 360
					end, progressStartState, progressWidthState),
					_Computed(function(width: number): number
						return 360 - width - BUFFER * 2
					end, progressWidthState),
					emptyColorState,
					transparencyState
				))({
					ZIndex = 1,
					Name = "Empty",
				}),
			},
	}) :: GuiObject

	if DEBUG_ENABLED then
		_new("TextLabel")({
			Text = _Computed(function(inputProgress: number?): string
				return if inputProgress then tostring(math.round(inputProgress * 100)) else "?"
			end, inputProgressState),
			TextSize = 16,
			TextColor3 = fillColorState,
			Parent = out,
			BackgroundTransparency = 1,
			Size = UDim2.fromScale(1, 1),
		})
	end

	if USE_EDITABLE_IMAGE then
		assert(imageLabel)

		maid:GiveTask(RunService.RenderStepped:Connect(function(deltaTime: number)
			editableImage.Size = Vector2.new(
				EDIT_IMG_WIDTH, --math.round(imageLabel.AbsoluteSize.X * 0.5),
				EDIT_IMG_WIDTH --math.round(imageLabel.AbsoluteSize.Y * 0.5)
			)
			local outerRadius = math.ceil(editableImage.Size.X * 0.5 - 1)
			local innerRadius = math.ceil(outerRadius * 0.5)
			local center = editableImage.Size / 2
			local fCol = fillColorState:Get()
			local eCol = emptyColorState:Get()

			local trans = transparencyState:Get()
			editableImage:DrawRectangle(
				Vector2.zero,
				editableImage.Size - Vector2.one,
				eCol,
				1,
				Enum.ImageCombineType.Overwrite
			)

			local startAngle = progressStartState:Get() --+BUFFER
			local widthAngle = progressWidthState:Get()
			local midAngle = startAngle + widthAngle * 0.5
			local finishAngle = startAngle + widthAngle ---BUFFER

			local fillCount = 0

			local function getIfFilled(angle: number): boolean
				return (
					angle >= startAngle
					and angle < (if midAngle > 360 or finishAngle > 360 then 360 else midAngle)
				)
					or (
						angle >= (if midAngle > 360 or finishAngle > 360 then 0 else midAngle)
						and angle < finishAngle % 360
					)
			end

			for y = 0, editableImage.Size.Y - 1 do
				for x = 0, editableImage.Size.X - 1 do
					local offset = (Vector2.new(x, y) - center) * Vector2.new(1, 1)
					local dist = offset.Magnitude
					if dist > innerRadius and dist < outerRadius then
						local angle = math.deg(math.atan2(offset.Y, offset.X) + math.rad(90))
						if angle < 0 then
							angle = 360 + angle
						end

						local isFilled = getIfFilled(angle)

						if isFilled then
							fillCount += 1
							editableImage:DrawRectangle(
								Vector2.new(x, y),
								Vector2.one,
								fCol,
								trans,
								Enum.ImageCombineType.Overwrite
							)
						else
							editableImage:DrawRectangle(
								Vector2.new(x, y),
								Vector2.one,
								eCol,
								trans,
								Enum.ImageCombineType.Overwrite
							)
						end
					end
				end
			end
			-- print(`{math.round(startAngle)}->{math.round(finishAngle)}={fillCount}`)
		end))
	end

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

	return out
end

return Interface


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

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

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

return {
	NEW = {
		PROGRESS = nil :: number?,
		IS_ENABLED = true,
		FILL_COLOR = Color3.new(),
		EMPTY_COLOR = Color3.new(),
		SCALE = 1,
	},
	PRIMARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		PROGRESS = nil :: number?,
		IS_ENABLED = true,
	},
	SECONDARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		PROGRESS = nil :: number?,
		IS_ENABLED = true,
	},
	TERTIARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		PROGRESS = nil :: number?,
		IS_ENABLED = true,
	},
}


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

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

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

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

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

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

function Interface.new(
	progress: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean>,
	fillColor: FusionCanBeState<Color3>,
	emptyColor: FusionCanBeState<Color3>,
	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(progress, DEFAULTS.NEW.PROGRESS),
		convert(isEnabled, DEFAULTS.NEW.IS_ENABLED),
		convert(fillColor, DEFAULTS.NEW.FILL_COLOR),
		convert(emptyColor, DEFAULTS.NEW.EMPTY_COLOR),
		convert(scale, DEFAULTS.NEW.SCALE)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.primary(
	style: FusionCanBeState<Style>,
	progress: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.primary(
		convert(style, DEFAULTS.PRIMARY.STYLE),
		convert(progress, DEFAULTS.PRIMARY.PROGRESS),
		convert(isEnabled, DEFAULTS.PRIMARY.IS_ENABLED)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.secondary(
	style: FusionCanBeState<Style>,
	progress: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.secondary(
		convert(style, DEFAULTS.SECONDARY.STYLE),
		convert(progress, DEFAULTS.SECONDARY.PROGRESS),
		convert(isEnabled, DEFAULTS.SECONDARY.IS_ENABLED)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.tertiary(
	style: FusionCanBeState<Style>,
	progress: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.tertiary(
		convert(style, DEFAULTS.TERTIARY.STYLE),
		convert(progress, DEFAULTS.TERTIARY.PROGRESS),
		convert(isEnabled, DEFAULTS.TERTIARY.IS_ENABLED)
	)
	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
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 NewProgressIndicatorCircular = React.Component:extend("NewProgressIndicatorCircular")
	NewProgressIndicatorCircular.defaultProps = {
		progress = DEFAULTS.NEW.PROGRESS,
		isEnabled = DEFAULTS.NEW.IS_ENABLED,
		fillColor = DEFAULTS.NEW.FILL_COLOR,
		emptyColor = DEFAULTS.NEW.EMPTY_COLOR,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewProgressIndicatorCircular:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			progress = _Value(self.defaultProps.progress),
			isEnabled = _Value(self.defaultProps.isEnabled),
			fillColor = _Value(self.defaultProps.fillColor),
			emptyColor = _Value(self.defaultProps.emptyColor),
			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.progress,
			self._internalStates.isEnabled,
			self._internalStates.fillColor,
			self._internalStates.emptyColor,
			self._internalStates.scale
		)
	end

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

do
	local PrimaryProgressIndicatorCircular = React.Component:extend("PrimaryProgressIndicatorCircular")
	PrimaryProgressIndicatorCircular.defaultProps = {
		style = DEFAULTS.PRIMARY.STYLE,
		progress = DEFAULTS.PRIMARY.PROGRESS,
		isEnabled = DEFAULTS.PRIMARY.IS_ENABLED,
	}
	function PrimaryProgressIndicatorCircular: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),
			progress = _Value(self.defaultProps.progress),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.primary(
			self._internalStates.style,
			self._internalStates.progress,
			self._internalStates.isEnabled
		)
	end

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

do
	local SecondaryProgressIndicatorCircular = React.Component:extend("SecondaryProgressIndicatorCircular")
	SecondaryProgressIndicatorCircular.defaultProps = {
		style = DEFAULTS.SECONDARY.STYLE,
		progress = DEFAULTS.SECONDARY.PROGRESS,
		isEnabled = DEFAULTS.SECONDARY.IS_ENABLED,
	}
	function SecondaryProgressIndicatorCircular: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),
			progress = _Value(self.defaultProps.progress),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.secondary(
			self._internalStates.style,
			self._internalStates.progress,
			self._internalStates.isEnabled
		)
	end

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

do
	local TertiaryProgressIndicatorCircular = React.Component:extend("TertiaryProgressIndicatorCircular")
	TertiaryProgressIndicatorCircular.defaultProps = {
		style = DEFAULTS.TERTIARY.STYLE,
		progress = DEFAULTS.TERTIARY.PROGRESS,
		isEnabled = DEFAULTS.TERTIARY.IS_ENABLED,
	}
	function TertiaryProgressIndicatorCircular: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),
			progress = _Value(self.defaultProps.progress),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.tertiary(
			self._internalStates.style,
			self._internalStates.progress,
			self._internalStates.isEnabled
		)
	end

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

return Interface


--!strict
-- this script was generated by the build system, please do not make manual edits
local _Package = script.Parent.Parent.Parent.Parent
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))
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 NewProgressIndicatorCircular = Roact.Component:extend("NewProgressIndicatorCircular")
	NewProgressIndicatorCircular.defaultProps = {
		progress = DEFAULTS.NEW.PROGRESS,
		isEnabled = DEFAULTS.NEW.IS_ENABLED,
		fillColor = DEFAULTS.NEW.FILL_COLOR,
		emptyColor = DEFAULTS.NEW.EMPTY_COLOR,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewProgressIndicatorCircular:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			progress = _Value(self.defaultProps.progress),
			isEnabled = _Value(self.defaultProps.isEnabled),
			fillColor = _Value(self.defaultProps.fillColor),
			emptyColor = _Value(self.defaultProps.emptyColor),
			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.progress,
			self._internalStates.isEnabled,
			self._internalStates.fillColor,
			self._internalStates.emptyColor,
			self._internalStates.scale
		)
	end

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

do
	local PrimaryProgressIndicatorCircular = Roact.Component:extend("PrimaryProgressIndicatorCircular")
	PrimaryProgressIndicatorCircular.defaultProps = {
		style = DEFAULTS.PRIMARY.STYLE,
		progress = DEFAULTS.PRIMARY.PROGRESS,
		isEnabled = DEFAULTS.PRIMARY.IS_ENABLED,
	}
	function PrimaryProgressIndicatorCircular: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),
			progress = _Value(self.defaultProps.progress),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.primary(
			self._internalStates.style,
			self._internalStates.progress,
			self._internalStates.isEnabled
		)
	end

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

do
	local SecondaryProgressIndicatorCircular = Roact.Component:extend("SecondaryProgressIndicatorCircular")
	SecondaryProgressIndicatorCircular.defaultProps = {
		style = DEFAULTS.SECONDARY.STYLE,
		progress = DEFAULTS.SECONDARY.PROGRESS,
		isEnabled = DEFAULTS.SECONDARY.IS_ENABLED,
	}
	function SecondaryProgressIndicatorCircular: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),
			progress = _Value(self.defaultProps.progress),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.secondary(
			self._internalStates.style,
			self._internalStates.progress,
			self._internalStates.isEnabled
		)
	end

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

do
	local TertiaryProgressIndicatorCircular = Roact.Component:extend("TertiaryProgressIndicatorCircular")
	TertiaryProgressIndicatorCircular.defaultProps = {
		style = DEFAULTS.TERTIARY.STYLE,
		progress = DEFAULTS.TERTIARY.PROGRESS,
		isEnabled = DEFAULTS.TERTIARY.IS_ENABLED,
	}
	function TertiaryProgressIndicatorCircular: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),
			progress = _Value(self.defaultProps.progress),
			isEnabled = _Value(self.defaultProps.isEnabled),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.tertiary(
			self._internalStates.style,
			self._internalStates.progress,
			self._internalStates.isEnabled
		)
	end

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

return Interface


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

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

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 CircularWrapperDefinition = {
	Progress: number?,
	IsEnabled: boolean,
	FillColor: Color3,
	EmptyColor: Color3,
	Scale: number,
}
export type CircularWrapper = Wrapper<GuiObject, CircularWrapperDefinition, "Circular">

export type StyledCircularWrapperDefinition = {
	Style: Style,
	Progress: number?,
	IsEnabled: boolean?,
}
export type StyledCircularWrapper = Wrapper<GuiObject, StyledCircularWrapperDefinition, "StyledCircular">
-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
-- Variables
-- References
-- Private Functions
-- Interface
local Interface = {}

function Interface.new(): StyledCircularWrapper
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local _Value = _fuse.Value
	local definition = {
		Progress = _Value(nil),
		IsEnabled = _Value(true),
		FillColor = _Value(Color3.new()),
		EmptyColor = _Value(Color3.new()),
		Scale = _Value(1),
	}
	local defaults: { [string]: unknown? } = {
		progress = DEFAULTS.NEW.PROGRESS,
		isEnabled = DEFAULTS.NEW.IS_ENABLED,
		fillColor = DEFAULTS.NEW.FILL_COLOR,
		emptyColor = DEFAULTS.NEW.EMPTY_COLOR,
		scale = DEFAULTS.NEW.SCALE,
	}
	local inst: GuiObject = Source.new(
		definition.Progress,
		definition.IsEnabled,
		definition.FillColor,
		definition.EmptyColor,
		definition.Scale
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledCircular", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.primary(): StyledCircularWrapper
	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))),
		Progress = _Value(nil),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.PRIMARY.STYLE,
		progress = DEFAULTS.PRIMARY.PROGRESS,
		isEnabled = DEFAULTS.PRIMARY.IS_ENABLED,
	}
	local inst: GuiObject = Source.primary(definition.Style, definition.Progress, definition.IsEnabled)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledCircular", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.secondary(): StyledCircularWrapper
	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))),
		Progress = _Value(nil),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.SECONDARY.STYLE,
		progress = DEFAULTS.SECONDARY.PROGRESS,
		isEnabled = DEFAULTS.SECONDARY.IS_ENABLED,
	}
	local inst: GuiObject = Source.secondary(definition.Style, definition.Progress, definition.IsEnabled)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledCircular", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

function Interface.tertiary(): StyledCircularWrapper
	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))),
		Progress = _Value(nil),
		IsEnabled = _Value(true),
	}
	local defaults: { [string]: unknown? } = {
		style = DEFAULTS.TERTIARY.STYLE,
		progress = DEFAULTS.TERTIARY.PROGRESS,
		isEnabled = DEFAULTS.TERTIARY.IS_ENABLED,
	}
	local inst: GuiObject = Source.tertiary(definition.Style, definition.Progress, definition.IsEnabled)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	local wrapper, cleanUp = Translators.ColdFusion.toWrapper("StyledCircular", inst, definition, defaults)
	maid:GiveTask(cleanUp)
	return wrapper
end

return Interface


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

-- Types
-- Constants
local KEY = "ProgressValue"
-- Variables
-- References

-- Private Functions
-- Class
return function(frame: Frame)
	local maid = Maid.new()
	local isDead = false
	task.spawn(function()
		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 progressState: ColdFusion.ValueState<number?> = _Value(nil :: number?)
		maid:GiveTask(frame:GetAttributeChangedSignal(KEY):Connect(function()
			progressState:Set(frame:GetAttribute(KEY) :: any)
		end))
		frame:SetAttribute(KEY, math.random())

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

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

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

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

			do
				local button = maid:GiveTask(
					Module.new(
						progressState,
						true,
						style:GetColor(Enums.ColorRoleType.Primary, 1),
						style:GetColor(Enums.ColorRoleType.PrimaryContainer, 1),
						style.Scale
					)
				)
				button.Parent = halfFrame
			end

			return halfFrame
		end

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

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

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

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

		for i = 1, 1000 do
			task.wait(4)
			if isDead then
				break
			end
			if i % 2 == 0 then
				frame:SetAttribute(KEY, nil)
			else
				frame:SetAttribute(KEY, math.random())
			end
			-- frame:SetAttribute(KEY, nil)
		end
	end)

	return function()
		isDead = false
		maid:Destroy()
	end
end


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

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

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

-- Private Functions
-- 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.Background)
			halfFrame.BorderSizePixel = 0

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

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

			do
				local indicator = maid:GiveTask(Module.primary(style, nil))
				indicator.Parent = halfFrame
			end
			do
				local indicator = maid:GiveTask(Module.secondary(style, nil))
				indicator.Parent = halfFrame
			end
			do
				local indicator = maid:GiveTask(Module.tertiary(style, nil))
				indicator.Parent = halfFrame
			end

			return halfFrame
		end

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

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

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

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

	return function()
		maid:Destroy()
	end
end


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

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

-- Packages
local Defaults = require(script.Parent.Defaults)
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 Sounds = require(_Package:WaitForChild("Sounds"))
local Theme = require(_Package:WaitForChild("Theme"))

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

-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
local LAYER_SIZE_DP = 40
local BUTTON_SIZE_DP = 18
local UNSELECT_OUTLINE_WIDTH_DP = 2
-- Variables
-- References
-- Private Functions

-- Class
local Interface = {}

function newThemedComponent(
	themeDefaults: typeof(DEFAULTS.PRIMARY),
	style: CanBeState<Style>,
	outlineColor: Enums.ColorRoleType,
	fillColor: Enums.ColorRoleType,
	iconColor: Enums.ColorRoleType,
	disabledColor: Enums.ColorRoleType,
	onSelect: CanBeState<(isSelected: boolean) -> ()>,
	initialSelection: CanBeState<boolean>,
	elevation: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): 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(onSelect, themeDefaults.ON_SELECT),
		_import(initialSelection, themeDefaults.INITIAL_SELECTION),
		_import(isEnabled, themeDefaults.IS_ENABLED),
		_Computed(function(s: Style): Color3
			return s:GetColor(outlineColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(fillColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(iconColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(disabledColor)
		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

function Interface.primary(
	style: CanBeState<Style>,
	onSelect: CanBeState<(isSelected: boolean) -> ()>,
	initialSelection: CanBeState<boolean>,
	elevation: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	return newThemedComponent(
		Defaults.PRIMARY,
		style,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.Primary,
		Enums.ColorRoleType.OnPrimary,
		Enums.ColorRoleType.OnSurface,
		onSelect,
		initialSelection,
		elevation,
		isEnabled
	)
end

function Interface.secondary(
	style: CanBeState<Style>,
	onSelect: CanBeState<(isSelected: boolean) -> ()>,
	initialSelection: CanBeState<boolean>,
	elevation: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	return newThemedComponent(
		Defaults.SECONDARY,
		style,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.Secondary,
		Enums.ColorRoleType.OnSecondary,
		Enums.ColorRoleType.OnSurface,
		onSelect,
		initialSelection,
		elevation,
		isEnabled
	)
end

function Interface.tertiary(
	style: CanBeState<Style>,
	onSelect: CanBeState<(isSelected: boolean) -> ()>,
	initialSelection: CanBeState<boolean>,
	elevation: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	return newThemedComponent(
		Defaults.TERTIARY,
		style,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.Tertiary,
		Enums.ColorRoleType.OnTertiary,
		Enums.ColorRoleType.OnSurface,
		onSelect,
		initialSelection,
		elevation,
		isEnabled
	)
end

function Interface.primaryContainer(
	style: CanBeState<Style>,
	onSelect: CanBeState<(isSelected: boolean) -> ()>,
	initialSelection: CanBeState<boolean>,
	elevation: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	return newThemedComponent(
		Defaults.PRIMARY_CONTAINER,
		style,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.PrimaryContainer,
		Enums.ColorRoleType.OnPrimaryContainer,
		Enums.ColorRoleType.OnSurface,
		onSelect,
		initialSelection,
		elevation,
		isEnabled
	)
end

function Interface.secondaryContainer(
	style: CanBeState<Style>,
	onSelect: CanBeState<(isSelected: boolean) -> ()>,
	initialSelection: CanBeState<boolean>,
	elevation: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	return newThemedComponent(
		Defaults.SECONDARY_CONTAINER,
		style,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.SecondaryContainer,
		Enums.ColorRoleType.OnSecondaryContainer,
		Enums.ColorRoleType.OnSurface,
		onSelect,
		initialSelection,
		elevation,
		isEnabled
	)
end

function Interface.tertiaryContainer(
	style: CanBeState<Style>,
	onSelect: CanBeState<(isSelected: boolean) -> ()>,
	initialSelection: CanBeState<boolean>,
	elevation: CanBeState<number?>,
	isEnabled: CanBeState<boolean?>
): GuiObject
	return newThemedComponent(
		Defaults.TERTIARY_CONTAINER,
		style,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.TertiaryContainer,
		Enums.ColorRoleType.OnTertiaryContainer,
		Enums.ColorRoleType.OnSurface,
		onSelect,
		initialSelection,
		elevation,
		isEnabled
	)
end
function Interface.new(
	onSelect: CanBeState<(isSelected: boolean) -> ()>,
	initialSelection: CanBeState<boolean>,
	isEnabled: CanBeState<boolean>,
	outlineColor: CanBeState<Color3>,
	fillColor: CanBeState<Color3>,
	iconColor: CanBeState<Color3>,
	disabledColor: 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 initialSelectionState = _import(initialSelection, DEFAULTS.NEW.INITIAL_SELECTION)
	local outlineColorState = _import(outlineColor, DEFAULTS.NEW.OUTLINE_COLOR)
	local fillColorState = _import(fillColor, DEFAULTS.NEW.FILL_COLOR)
	local disabledColorState = _import(disabledColor, DEFAULTS.NEW.DISABLED_COLOR)
	local iconColorState = _import(iconColor, DEFAULTS.NEW.ICON_COLOR)
	local elevationState = _import(elevation, DEFAULTS.NEW.ELEVATION)
	local isEnabledState = _import(isEnabled, DEFAULTS.NEW.IS_ENABLED)
	local onSelectState = _import(onSelect, DEFAULTS.NEW.ON_SELECT)

	local clickCountState = _Value(0)
	local hasClicked = _Value(false)

	initialSelectionState:Connect(function()
		hasClicked:Set(false)
	end)

	local valueState = _Computed(function(initial: boolean, count: number, hasClick: boolean): boolean
		if count % 2 == 0 then
			return initial
		else
			return not initial
		end
	end, initialSelectionState, clickCountState, hasClicked)

	local renderDatasState = _Computed(
		function(
			st: Enums.SchemeType,
			sc: number,
			f: FontData,
			oC: Color3,
			fC: Color3,
			iC: Color3,
			dC: Color3,
			e: number
		): { [Enums.ButtonStateType]: RenderData }
			return {
				[Enums.ButtonStateType.Enabled] = Types._RenderData.new(
					sc,
					Types._AppearanceData.new(Theme.getElevatedColor(oC, e, st), 0),
					Types._AppearanceData.new(Theme.getElevatedColor(fC, e, st), 1),
					Types._AppearanceData.new(Theme.getElevatedColor(iC, e, st), 0),
					nil,
					nil,
					nil,
					nil
				),
				[Enums.ButtonStateType.Disabled] = Types._RenderData.new(
					sc,
					Types._AppearanceData.new(Theme.getElevatedColor(dC, e, st), 1 - 0.38),
					Types._AppearanceData.new(Theme.getElevatedColor(dC, e, st), 1),
					Types._AppearanceData.new(Theme.getElevatedColor(dC, e, st), 1 - 0.38),
					nil,
					nil,
					nil,
					nil
				),
				[Enums.ButtonStateType.Hovered] = Types._RenderData.new(
					sc,
					Types._AppearanceData.new(Theme.getElevatedColor(oC, e + 1, st), 0),
					Types._AppearanceData.new(Theme.getElevatedColor(fC, e + 1, st), 1 - 0.08),
					Types._AppearanceData.new(Theme.getElevatedColor(iC, e + 1, st), 0),
					nil,
					nil,
					nil,
					nil
				),
				[Enums.ButtonStateType.Focused] = Types._RenderData.new(
					sc,
					Types._AppearanceData.new(Theme.getElevatedColor(oC, e, st), 0),
					Types._AppearanceData.new(Theme.getElevatedColor(fC, e, st), 1 - 0.1),
					Types._AppearanceData.new(Theme.getElevatedColor(iC, e, st), 0),
					nil,
					nil,
					nil,
					nil
				),
				[Enums.ButtonStateType.Pressed] = Types._RenderData.new(
					sc,
					Types._AppearanceData.new(Theme.getElevatedColor(oC, e - 1, st), 0),
					Types._AppearanceData.new(Theme.getElevatedColor(fC, e - 1, st), 1 - 0.1),
					Types._AppearanceData.new(Theme.getElevatedColor(iC, e - 1, st), 0),
					nil,
					nil,
					nil,
					nil
				),
			}
		end,
		schemeTypeState,
		scaleState,
		fontDataState,
		outlineColorState,
		fillColorState,
		iconColorState,
		disabledColorState,
		elevationState
	)

	local isFocusedState = _Value(false)
	local isPressedState = _Value(false)
	local isHoveredState = _Value(false)

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

	local renderDataState = _Computed(
		function(
			renderDatas: { [Enums.ButtonStateType]: RenderData },
			bState: Enums.ButtonStateType
		): RenderData
			return renderDatas[bState]
		end,
		renderDatasState,
		currentStateState
	)

	local inst = _new("ImageButton")({
		Size = _Computed(function(sc: number): UDim2
			return UDim2.fromOffset(sc * LAYER_SIZE_DP, sc * LAYER_SIZE_DP)
		end, scaleState),
		BackgroundColor3 = _Computed(function(data: RenderData): Color3
			return data.Background.Color3
		end, renderDataState),
		BackgroundTransparency = _Computed(function(data: RenderData): number
			return data.Background.Transparency
		end, renderDataState),
		Events = {
			Activated = function()
				if isEnabledState:Get() == false then
					return
				end
				hasClicked:Set(true)
				local onClick = onSelectState:Get()
				local count = clickCountState:Get() + 1
				clickCountState:Set(count)

				do
					local sound = Instance.new("Sound")
					sound.Volume = 1
					if valueState:Get() == true then
						sound.SoundId = Sounds.Library[Enums.SoundType.navigation_forward_selection_minimal]
					else
						sound.SoundId = Sounds.Library[Enums.SoundType.navigation_backward_selection_minimal]
					end
					SoundService:PlayLocalSound(sound)
					sound:Destroy()
				end

				onClick(valueState:Get())
			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("UICorner")({
				CornerRadius = UDim.new(0.5, 0),
			}),
			_new("UIListLayout")({
				Padding = UDim.new(0, 0),
				SortOrder = Enum.SortOrder.LayoutOrder,
				FillDirection = Enum.FillDirection.Horizontal,
				ItemLineAlignment = Enum.ItemLineAlignment.Center,
				VerticalAlignment = Enum.VerticalAlignment.Center,
				HorizontalAlignment = Enum.HorizontalAlignment.Center,
			}),
			_new("Frame")({
				Size = _Computed(function(sc: number): UDim2
					local dpWidth = BUTTON_SIZE_DP - (UNSELECT_OUTLINE_WIDTH_DP * 2)
					dpWidth /= 2
					dpWidth = math.round(dpWidth)
					dpWidth *= 2
					return UDim2.fromOffset(sc * dpWidth, sc * dpWidth)
				end, scaleState),
				BackgroundTransparency = 1,
				Children = {
					_new("UICorner")({
						CornerRadius = UDim.new(0.5, 0),
					}),
					_new("UIListLayout")({
						Padding = UDim.new(0, 0),
						SortOrder = Enum.SortOrder.LayoutOrder,
						FillDirection = Enum.FillDirection.Horizontal,
						ItemLineAlignment = Enum.ItemLineAlignment.Center,
						VerticalAlignment = Enum.VerticalAlignment.Center,
						HorizontalAlignment = Enum.HorizontalAlignment.Center,
					}),
					_new("UIStroke")({
						ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
						Color = _Computed(function(renderData: RenderData, v: boolean?): Color3
							return if v == false
								then renderData.Border.Color3
								else renderData.Background.Color3
						end, renderDataState, valueState),
						LineJoinMode = Enum.LineJoinMode.Round,
						Thickness = _Computed(function(sc: number): number
							return sc * UNSELECT_OUTLINE_WIDTH_DP
						end, scaleState),
						Transparency = _Computed(function(renderData: RenderData): number
							return renderData.Border.Transparency
						end, renderDataState),
					}),
					_new("Frame")({
						BackgroundTransparency = _Computed(function(v: boolean?): number
							return if v == false then 1 else 0
						end, valueState),
						AnchorPoint = Vector2.new(0.5, 0.5),
						Size = _Computed(function(sc: number): UDim2
							local dpWidth = 0.5 * (BUTTON_SIZE_DP - (UNSELECT_OUTLINE_WIDTH_DP * 2))
							dpWidth /= 2
							dpWidth = math.round(dpWidth)
							dpWidth *= 2
							return UDim2.fromOffset(sc * dpWidth, sc * dpWidth)
						end, scaleState),
						BackgroundColor3 = _Computed(function(renderData: RenderData, v: boolean?): Color3
							return if v == false
								then renderData.Border.Color3
								else renderData.Background.Color3
						end, renderDataState, valueState),
						BorderSizePixel = 0,
						Children = {
							_new("UICorner")({
								CornerRadius = UDim.new(0.5, 0),
							}),
						},
					}),
				},
			}),
		},
	}) :: GuiObject

	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
local _Packages = _Package.Parent
-- Services
-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local ColdFusion = require(_Packages:WaitForChild("ColdFusion"))

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

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

return {
	NEW = {
		ON_SELECT = function(isSelected: boolean) end,
		INITIAL_SELECTION = false,
		IS_ENABLED = true,
		OUTLINE_COLOR = Color3.new(),
		FILL_COLOR = Color3.new(),
		ICON_COLOR = Color3.new(),
		DISABLED_COLOR = Color3.new(),
		ELEVATION = 0,
		SCHEME_TYPE = Enums.SchemeType.Light,
		FONT_DATA = Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14),
		SCALE = 1,
	},
	PRIMARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_SELECT = function(isSelected: boolean) end,
		INITIAL_SELECTION = false,
		ELEVATION = 0,
		IS_ENABLED = true,
	},
	SECONDARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_SELECT = function(isSelected: boolean) end,
		INITIAL_SELECTION = false,
		ELEVATION = 0,
		IS_ENABLED = true,
	},
	TERTIARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_SELECT = function(isSelected: boolean) end,
		INITIAL_SELECTION = false,
		ELEVATION = 0,
		IS_ENABLED = true,
	},
	PRIMARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_SELECT = function(isSelected: boolean) end,
		INITIAL_SELECTION = false,
		ELEVATION = 0,
		IS_ENABLED = true,
	},
	SECONDARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_SELECT = function(isSelected: boolean) end,
		INITIAL_SELECTION = false,
		ELEVATION = 0,
		IS_ENABLED = true,
	},
	TERTIARY_CONTAINER = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		ON_SELECT = function(isSelected: boolean) end,
		INITIAL_SELECTION = false,
		ELEVATION = 0,
		IS_ENABLED = true,
	},
}


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

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

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

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

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

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

function Interface.new(
	onSelect: FusionCanBeState<(isSelected: boolean) -> ()>,
	initialSelection: FusionCanBeState<boolean>,
	isEnabled: FusionCanBeState<boolean>,
	outlineColor: FusionCanBeState<Color3>,
	fillColor: FusionCanBeState<Color3>,
	iconColor: FusionCanBeState<Color3>,
	disabledColor: 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(onSelect, DEFAULTS.NEW.ON_SELECT),
		convert(initialSelection, DEFAULTS.NEW.INITIAL_SELECTION),
		convert(isEnabled, DEFAULTS.NEW.IS_ENABLED),
		convert(outlineColor, DEFAULTS.NEW.OUTLINE_COLOR),
		convert(fillColor, DEFAULTS.NEW.FILL_COLOR),
		convert(iconColor, DEFAULTS.NEW.ICON_COLOR),
		convert(disabledColor, DEFAULTS.NEW.DISABLED_COLOR),
		convert(elevation, DEFAULTS.NEW.ELEVATION),
		convert(schemeType, DEFAULTS.NEW.SCHEME_TYPE),
		convert(fontData, DEFAULTS.NEW.FONT_DATA),
		convert(scale, DEFAULTS.NEW.SCALE)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.primary(
	style: FusionCanBeState<Style>,
	onSelect: FusionCanBeState<(isSelected: boolean) -> ()>,
	initialSelection: FusionCanBeState<boolean>,
	elevation: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.primary(
		convert(style, DEFAULTS.PRIMARY.STYLE),
		convert(onSelect, DEFAULTS.PRIMARY.ON_SELECT),
		convert(initialSelection, DEFAULTS.PRIMARY.INITIAL_SELECTION),
		convert(elevation, DEFAULTS.PRIMARY.ELEVATION),
		convert(isEnabled, DEFAULTS.PRIMARY.IS_ENABLED)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.secondary(
	style: FusionCanBeState<Style>,
	onSelect: FusionCanBeState<(isSelected: boolean) -> ()>,
	initialSelection: FusionCanBeState<boolean>,
	elevation: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.secondary(
		convert(style, DEFAULTS.SECONDARY.STYLE),
		convert(onSelect, DEFAULTS.SECONDARY.ON_SELECT),
		convert(initialSelection, DEFAULTS.SECONDARY.INITIAL_SELECTION),
		convert(elevation, DEFAULTS.SECONDARY.ELEVATION),
		convert(isEnabled, DEFAULTS.SECONDARY.IS_ENABLED)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.tertiary(
	style: FusionCanBeState<Style>,
	onSelect: FusionCanBeState<(isSelected: boolean) -> ()>,
	initialSelection: FusionCanBeState<boolean>,
	elevation: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): GuiObject
	local maid = Maid.new()
	local _fuse = ColdFusion.fuse(maid)
	local function convert<V>(value: FusionCanBeState<V>, default: V): CanBeState<V>
		return Translators.Fusion.toColdFusion(maid, _fuse, value, default)
	end
	local inst = Source.tertiary(
		convert(style, DEFAULTS.TERTIARY.STYLE),
		convert(onSelect, DEFAULTS.TERTIARY.ON_SELECT),
		convert(initialSelection, DEFAULTS.TERTIARY.INITIAL_SELECTION),
		convert(elevation, DEFAULTS.TERTIARY.ELEVATION),
		convert(isEnabled, DEFAULTS.TERTIARY.IS_ENABLED)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.primaryContainer(
	style: FusionCanBeState<Style>,
	onSelect: FusionCanBeState<(isSelected: boolean) -> ()>,
	initialSelection: FusionCanBeState<boolean>,
	elevation: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): 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(onSelect, DEFAULTS.PRIMARY_CONTAINER.ON_SELECT),
		convert(initialSelection, DEFAULTS.PRIMARY_CONTAINER.INITIAL_SELECTION),
		convert(elevation, DEFAULTS.PRIMARY_CONTAINER.ELEVATION),
		convert(isEnabled, DEFAULTS.PRIMARY_CONTAINER.IS_ENABLED)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.secondaryContainer(
	style: FusionCanBeState<Style>,
	onSelect: FusionCanBeState<(isSelected: boolean) -> ()>,
	initialSelection: FusionCanBeState<boolean>,
	elevation: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): 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(onSelect, DEFAULTS.SECONDARY_CONTAINER.ON_SELECT),
		convert(initialSelection, DEFAULTS.SECONDARY_CONTAINER.INITIAL_SELECTION),
		convert(elevation, DEFAULTS.SECONDARY_CONTAINER.ELEVATION),
		convert(isEnabled, DEFAULTS.SECONDARY_CONTAINER.IS_ENABLED)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.tertiaryContainer(
	style: FusionCanBeState<Style>,
	onSelect: FusionCanBeState<(isSelected: boolean) -> ()>,
	initialSelection: FusionCanBeState<boolean>,
	elevation: FusionCanBeState<number?>,
	isEnabled: FusionCanBeState<boolean?>
): 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(onSelect, DEFAULTS.TERTIARY_CONTAINER.ON_SELECT),
		convert(initialSelection, DEFAULTS.TERTIARY_CONTAINER.INITIAL_SELECTION),
		convert(elevation, DEFAULTS.TERTIARY_CONTAINER.ELEVATION),
		convert(isEnabled, DEFAULTS.TERTIARY_CONTAINER.IS_ENABLED)
	)
	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
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 NewRadioButton = React.Component:extend("NewRadioButton")
	NewRadioButton.defaultProps = {
		onSelect = DEFAULTS.NEW.ON_SELECT,
		initialSelection = DEFAULTS.NEW.INITIAL_SELECTION,
		isEnabled = DEFAULTS.NEW.IS_ENABLED,
		outlineColor = DEFAULTS.NEW.OUTLINE_COLOR,
		fillColor = DEFAULTS.NEW.FILL_COLOR,
		iconColor = DEFAULTS.NEW.ICON_COLOR,
		disabledColor = DEFAULTS.NEW.DISABLED_COLOR,
		elevation = DEFAULTS.NEW.ELEVATION,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		fontData = DEFAULTS.NEW.FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewRadioButton:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			onSelect = _Value(self.defaultProps.onSelect),
			initialSelection = _Value(self.defaultProps.initialSelection),
			isEnabled = _Value(self.defaultProps.isEnabled),
			outlineColor = _Value(self.defaultProps.outlineColor),
			fillColor = _Value(self.defaultProps.fillColor),
			iconColor = _Value(self.defaultProps.iconColor),
			disabledColor = _Value(self.defaultProps.disabledColor),
			elevation = _Value(self.defaultProps.elevation),
			schemeType = _Value(self.defaultProps.schemeType),
			fontData = _Value(self.defaultProps.fontData),
			scale = _Value(self.defaultProps.scale),
		}
		table.freeze(self._internalStates)
		for k, v in pairs(initialProps) do
			if self._internalStates[k] then
				self._internalStates[k]:Set(v)
			end
		end
		self._instance = Source.new(
			self._internalStates.onSelect,
			self._internalStates.initialSelection,
			self._internalStates.isEnabled,
			self._internalStates.outlineColor,
			self._internalStates.fillColor,
			self._internalStates.iconColor,
			self._internalStates.disabledColor,
			self._internalStates.elevation,
			self._internalStates.schemeType,
			self._internalStates.fontData,
			self._internalStates.scale
		)
	end

	function NewRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return React.createElement(ReactRoblox.createPortal, props)
	end
	function NewRadioButton: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 NewRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.New = NewRadioButton
end

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

	function PrimaryRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return React.createElement(ReactRoblox.createPortal, props)
	end
	function PrimaryRadioButton: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 PrimaryRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Primary = PrimaryRadioButton
end

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

	function SecondaryRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return React.createElement(ReactRoblox.createPortal, props)
	end
	function SecondaryRadioButton: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 SecondaryRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Secondary = SecondaryRadioButton
end

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

	function TertiaryRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return React.createElement(ReactRoblox.createPortal, props)
	end
	function TertiaryRadioButton: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 TertiaryRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Tertiary = TertiaryRadioButton
end

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

	function PrimaryContainerRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return React.createElement(ReactRoblox.createPortal, props)
	end
	function PrimaryContainerRadioButton: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 PrimaryContainerRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.PrimaryContainer = PrimaryContainerRadioButton
end

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

	function SecondaryContainerRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return React.createElement(ReactRoblox.createPortal, props)
	end
	function SecondaryContainerRadioButton: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 SecondaryContainerRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.SecondaryContainer = SecondaryContainerRadioButton
end

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

	function TertiaryContainerRadioButton:render()
		local props = {
			target = self._instance,
		}
		for k, v in pairs(self.props) do
			if self.props[k] ~= v then
				if self._internalStates[k] then
					if v == nil then
						v = self.defaultProps[k]
					end
					self._internalStates[k]:Set(v)
				else
					props[k] = v
				end
			end
		end
		return React.createElement(ReactRoblox.createPortal, props)
	end
	function TertiaryContainerRadioButton: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 TertiaryContainerRadioButton:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.TertiaryContainer = TertiaryContainerRadioButton
end

return Interface