--!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 NewCheckbox = React.Component:extend("NewCheckbox")
	NewCheckbox.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 NewCheckbox: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 NewCheckbox: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 NewCheckbox: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 NewCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.New = NewCheckbox
end

do
	local PrimaryCheckbox = React.Component:extend("PrimaryCheckbox")
	PrimaryCheckbox.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 PrimaryCheckbox: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 PrimaryCheckbox: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 PrimaryCheckbox: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 PrimaryCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Primary = PrimaryCheckbox
end

do
	local SecondaryCheckbox = React.Component:extend("SecondaryCheckbox")
	SecondaryCheckbox.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 SecondaryCheckbox: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 SecondaryCheckbox: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 SecondaryCheckbox: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 SecondaryCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Secondary = SecondaryCheckbox
end

do
	local TertiaryCheckbox = React.Component:extend("TertiaryCheckbox")
	TertiaryCheckbox.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 TertiaryCheckbox: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 TertiaryCheckbox: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 TertiaryCheckbox: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 TertiaryCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Tertiary = TertiaryCheckbox
end

do
	local PrimaryContainerCheckbox = React.Component:extend("PrimaryContainerCheckbox")
	PrimaryContainerCheckbox.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 PrimaryContainerCheckbox: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 PrimaryContainerCheckbox: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 PrimaryContainerCheckbox: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 PrimaryContainerCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.PrimaryContainer = PrimaryContainerCheckbox
end

do
	local SecondaryContainerCheckbox = React.Component:extend("SecondaryContainerCheckbox")
	SecondaryContainerCheckbox.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 SecondaryContainerCheckbox: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 SecondaryContainerCheckbox: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 SecondaryContainerCheckbox: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 SecondaryContainerCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.SecondaryContainer = SecondaryContainerCheckbox
end

do
	local TertiaryContainerCheckbox = React.Component:extend("TertiaryContainerCheckbox")
	TertiaryContainerCheckbox.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 TertiaryContainerCheckbox: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 TertiaryContainerCheckbox: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 TertiaryContainerCheckbox: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 TertiaryContainerCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.TertiaryContainer = TertiaryContainerCheckbox
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 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 NewCheckbox = Roact.Component:extend("NewCheckbox")
	NewCheckbox.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 NewCheckbox: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 NewCheckbox: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 NewCheckbox: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 NewCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.New = NewCheckbox
end

do
	local PrimaryCheckbox = Roact.Component:extend("PrimaryCheckbox")
	PrimaryCheckbox.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 PrimaryCheckbox: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 PrimaryCheckbox: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 PrimaryCheckbox: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 PrimaryCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Primary = PrimaryCheckbox
end

do
	local SecondaryCheckbox = Roact.Component:extend("SecondaryCheckbox")
	SecondaryCheckbox.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 SecondaryCheckbox: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 SecondaryCheckbox: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 SecondaryCheckbox: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 SecondaryCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Secondary = SecondaryCheckbox
end

do
	local TertiaryCheckbox = Roact.Component:extend("TertiaryCheckbox")
	TertiaryCheckbox.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 TertiaryCheckbox: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 TertiaryCheckbox: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 TertiaryCheckbox: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 TertiaryCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.Tertiary = TertiaryCheckbox
end

do
	local PrimaryContainerCheckbox = Roact.Component:extend("PrimaryContainerCheckbox")
	PrimaryContainerCheckbox.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 PrimaryContainerCheckbox: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 PrimaryContainerCheckbox: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 PrimaryContainerCheckbox: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 PrimaryContainerCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.PrimaryContainer = PrimaryContainerCheckbox
end

do
	local SecondaryContainerCheckbox = Roact.Component:extend("SecondaryContainerCheckbox")
	SecondaryContainerCheckbox.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 SecondaryContainerCheckbox: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 SecondaryContainerCheckbox: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 SecondaryContainerCheckbox: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 SecondaryContainerCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.SecondaryContainer = SecondaryContainerCheckbox
end

do
	local TertiaryContainerCheckbox = Roact.Component:extend("TertiaryContainerCheckbox")
	TertiaryContainerCheckbox.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 TertiaryContainerCheckbox: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 TertiaryContainerCheckbox: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 TertiaryContainerCheckbox: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 TertiaryContainerCheckbox:willUnmount()
		self._maid:Destroy()
		self._instance:Destroy()
	end
	Interface.TertiaryContainer = TertiaryContainerCheckbox
end

return Interface


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

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

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

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

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

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

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

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

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

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

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

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

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

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

return Interface


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

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

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

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

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

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

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

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

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

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

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

			return halfFrame
		end

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

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

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

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


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

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

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

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

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

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

			do
				print("build")
				local checkbox = maid:GiveTask(
					Module.primary(
						Fusion.Value(style),
						Fusion.Value(function(isSelected: boolean?)
							print("fuse is select", isSelected)
						end),
						true,
						nil
					)
				)
				checkbox.Parent = halfFrame
			end

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

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

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

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

			return halfFrame
		end

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

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

			dark.Size = UDim2.fromScale(width, 0.5)
			dark.Position = UDim2.fromScale(x, 0.5)
			dark.Parent = frame
		end
	end)
	return function()
		maid:Destroy()
	end
end


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

-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
local React = require(_Packages:WaitForChild("React"))
local ReactRoblox = require(_Packages:WaitForChild("ReactRoblox"))

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

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

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

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

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

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

			do
				local checkbox = React.createElement(Module.New, {
					onSelect = function(isSelected: boolean?)
						print("is selected", isSelected)
					end,
					initialSelection = nil,
					isEnabled = true,
					outlineColor = style:GetColor(Enums.ColorRoleType.OnSurfaceVariant),
					fillColor = style:GetColor(Enums.ColorRoleType.Primary),
					iconColor = style:GetColor(Enums.ColorRoleType.OnPrimary),
					disabledColor = style:GetColor(Enums.ColorRoleType.OnSurface),
					elevation = 0,
					schemeType = style.SchemeType,
					fontData = style:GetFontData(Enums.FontType.LabelLarge),
					scale = style.Scale,
				})
				print("A", checkbox)
				local root = ReactRoblox.createRoot(halfFrame)
				root:render(checkbox)
				-- print("B", checkbox)
				maid:GiveTask(function()
					root:render(nil)
				end)
			end

			return halfFrame
		end

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

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

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

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


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

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

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

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

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

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

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

			do
				local checkbox = Roact.createElement(Module.New, {
					onSelect = function(isSelected: boolean?)
						print("is selected", isSelected)
					end,
					initialSelection = nil,
					isEnabled = true,
					outlineColor = style:GetColor(Enums.ColorRoleType.OnSurfaceVariant),
					fillColor = style:GetColor(Enums.ColorRoleType.Primary),
					iconColor = style:GetColor(Enums.ColorRoleType.OnPrimary),
					disabledColor = style:GetColor(Enums.ColorRoleType.OnSurface),
					elevation = 0,
					schemeType = style.SchemeType,
					fontData = style:GetFontData(Enums.FontType.LabelLarge),
					scale = style.Scale,
				})
				print("A", checkbox)
				local tree = Roact.mount(checkbox, halfFrame)
				-- print("B", checkbox)
				maid:GiveTask(function()
					Roact.unmount(tree)
				end)
			end

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

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

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

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

			return halfFrame
		end

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

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

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

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


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

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

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

-- Class
return function(frame: Frame)
	local maid = Maid.new()
	task.spawn(function()
		local function makeHalfFrame(isDarkMode: boolean, color: Color3): Frame
			local style = Style.new(
				1.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.primary(style, function(isSelected: boolean?)
					print("is selected", isSelected)
				end, true))
				button.Parent = halfFrame
			end

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

			do
				local checkbox = maid:GiveTask(Module.primary())
				checkbox.OnSelect = function(isSelected: boolean?)
					print("vanilla is selected: ", isSelected)
				end
				checkbox.Style = style
				checkbox.Parent = halfFrame
			end

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

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

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

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

			return halfFrame
		end

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

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

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

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


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

-- Packages
local Maid = require(_Packages:WaitForChild("Maid"))
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 Button = require(
	_Package
		:WaitForChild("Component")
		:WaitForChild("Button")
		:WaitForChild("TextButton")
		:WaitForChild("ColdFusion")
)
local Util = require(_Package:WaitForChild("Util"))
local Typography = require(_Package:WaitForChild("Typography"))

-- Types
type Maid = Maid.Maid
type State<V> = ColdFusion.State<V>
type ValueState<V> = ColdFusion.ValueState<V>
type CanBeState<V> = ColdFusion.CanBeState<V>
type RenderData = Types.RenderData
type ImageData = Types.ImageData
type ButtonData = Types.ButtonData
type Style = Style.Style
type FontData = Types.FontData
-- Constants
local DEFAULTS = require(script.Parent:WaitForChild("Defaults"))
local ELEVATION = 6
local LIST_PAD_DP = 16
local ICON_SIZE_DP = 24
local SHAPE_DP = 28
local PADDING_DP = 24
local BUTTON_LIST_PAD_DP = 8
local MAX_BUTTON_COUNT = 2
local MIN_DESC_WIDTH_DP = 225
-- Variables
-- References
-- Private Functions
-- Class
local Interface = {}

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

	surfaceColor: Enums.ColorRoleType,
	buttonTextColor: Enums.ColorRoleType,
	disabledTextColor: Enums.ColorRoleType,
	headlineColor: Enums.ColorRoleType,
	descriptionColor: Enums.ColorRoleType,
	scrimColor: Enums.ColorRoleType,

	buttons: CanBeState<{ ButtonData }>,
	icon: CanBeState<ImageData?>,
	headline: CanBeState<string?>,
	description: CanBeState<string?>
): 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(buttons, themeDefaults.BUTTONS),
		_import(icon, themeDefaults.ICON),
		_import(headline, themeDefaults.HEADLINE),
		_import(description, themeDefaults.DESCRIPTION),
		_Computed(function(s: Style): Color3
			return s:GetColor(surfaceColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(buttonTextColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(disabledTextColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(headlineColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(descriptionColor)
		end, styleState),
		_Computed(function(s: Style): Color3
			return s:GetColor(scrimColor)
		end, styleState),
		_Computed(function(s: Style): any
			return s.SchemeType
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.HeadlineSmall)
		end, styleState),
		_Computed(function(s: Style): FontData
			return s:GetFontData(Enums.FontType.BodyMedium)
		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>,
	buttons: CanBeState<{ ButtonData }>,
	icon: CanBeState<ImageData?>,
	headline: CanBeState<string?>,
	description: CanBeState<string?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.PRIMARY,
		style,
		Enums.ColorRoleType.SurfaceContainerHigh,
		Enums.ColorRoleType.Primary,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.SurfaceTint,
		buttons,
		icon,
		headline,
		description
	)
end

function Interface.secondary(
	style: CanBeState<Style>,
	buttons: CanBeState<{ ButtonData }>,
	icon: CanBeState<ImageData?>,
	headline: CanBeState<string?>,
	description: CanBeState<string?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.SECONDARY,
		style,
		Enums.ColorRoleType.SurfaceContainerHigh,
		Enums.ColorRoleType.Secondary,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.SurfaceTint,
		buttons,
		icon,
		headline,
		description
	)
end

function Interface.tertiary(
	style: CanBeState<Style>,
	buttons: CanBeState<{ ButtonData }>,
	icon: CanBeState<ImageData?>,
	headline: CanBeState<string?>,
	description: CanBeState<string?>
): GuiObject
	return newThemedComponent(
		DEFAULTS.TERTIARY,
		style,
		Enums.ColorRoleType.SurfaceContainerHigh,
		Enums.ColorRoleType.Tertiary,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnSurface,
		Enums.ColorRoleType.OnSurfaceVariant,
		Enums.ColorRoleType.SurfaceTint,
		buttons,
		icon,
		headline,
		description
	)
end

function Interface.new(

	buttons: CanBeState<{ ButtonData }>,

	icon: CanBeState<ImageData?>,
	headline: CanBeState<string?>,
	description: CanBeState<string?>,

	surfaceColor: CanBeState<Color3>,
	buttonTextColor: CanBeState<Color3>,
	disabledTextColor: CanBeState<Color3>,
	headlineColor: CanBeState<Color3>,
	descriptionColor: CanBeState<Color3>,
	scrimColor: CanBeState<Color3>,
	schemeType: CanBeState<Enums.SchemeType>,
	headlineFontData: CanBeState<FontData>,
	bodyFontData: CanBeState<FontData>,
	buttonFontData: 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 headlineFontDataState: State<FontData> = _import(headlineFontData, DEFAULTS.NEW.HEADLINE_FONT_DATA)
	local bodyFontDataState: State<FontData> = _import(bodyFontData, DEFAULTS.NEW.BODY_FONT_DATA)
	local buttonFontDataState: State<FontData> = _import(buttonFontData, DEFAULTS.NEW.BUTTON_FONT_DATA)

	local iconState = _import(icon, DEFAULTS.NEW.ICON)

	local headlineState: State<string?> = _import(headline, DEFAULTS.NEW.HEADLINE)
	local descriptionState: State<string?> = _import(description, DEFAULTS.NEW.DESCRIPTION)

	local buttonsState: State<{ ButtonData }> = _import(buttons, DEFAULTS.NEW.BUTTONS)

	local surfaceColorState: State<Color3> = _import(surfaceColor, DEFAULTS.NEW.SURFACE_COLOR)
	local buttonTextColorState: State<Color3> = _import(buttonTextColor, DEFAULTS.NEW.BUTTON_TEXT_COLOR)
	local disabledButtonTextColorState: State<Color3> =
		_import(disabledTextColor, DEFAULTS.NEW.DISABLED_TEXT_COLOR)

	local headlineColorState: State<Color3> = _import(headlineColor, DEFAULTS.NEW.HEADLINE_COLOR)
	local descriptionColorState: State<Color3> = _import(descriptionColor, DEFAULTS.NEW.DESCRIPTION_COLOR)
	local scrimColorState: State<Color3> = _import(scrimColor, DEFAULTS.NEW.SCRIM_COLOR)

	local buttonContainer = _bind(maid:GiveTask(Util.Container.ColdFusion.new()))({
		LayoutOrder = 10,
		Children = {
			_new("UIListLayout")({
				Padding = _Computed(function(sc: number): UDim
					return UDim.new(0, sc * BUTTON_LIST_PAD_DP)
				end, scaleState),
				SortOrder = Enum.SortOrder.LayoutOrder,
				FillDirection = Enum.FillDirection.Horizontal,
				ItemLineAlignment = Enum.ItemLineAlignment.Center,
				VerticalAlignment = Enum.VerticalAlignment.Center,
				HorizontalAlignment = Enum.HorizontalAlignment.Right,
			}),
		},
	})

	local inst = _new("Frame")({
		Size = UDim2.fromScale(0, 0),
		BackgroundTransparency = 0.5,
		BackgroundColor3 = scrimColorState,
		AnchorPoint = Vector2.new(0.5, 0.5),
		Position = UDim2.fromScale(1, 1),
		AutomaticSize = Enum.AutomaticSize.XY,
		Children = {
			_new("UIListLayout")({
				Padding = UDim.new(0, 0),
				SortOrder = Enum.SortOrder.LayoutOrder,
				FillDirection = Enum.FillDirection.Vertical,
				ItemLineAlignment = Enum.ItemLineAlignment.Center,
				VerticalAlignment = Enum.VerticalAlignment.Center,
				HorizontalAlignment = Enum.HorizontalAlignment.Center,
			}),
			_new("Frame")({
				AutomaticSize = Enum.AutomaticSize.XY,
				Size = UDim2.fromScale(0, 0),
				BackgroundColor3 = surfaceColorState,
				Children = {
					maid:GiveTask(
						Util.List.ColdFusion.new(
							Enum.VerticalAlignment.Center,
							Enum.HorizontalAlignment.Center,
							Enum.FillDirection.Vertical,
							_Computed(function(sc: number): UDim
								return UDim.new(0, sc * LIST_PAD_DP)
							end, scaleState),
							Enum.UIFlexAlignment.None,
							Enum.UIFlexAlignment.Fill,
							Enum.ItemLineAlignment.Stretch,
							false
						)
					) :: Instance,
					_new("UICorner")({
						CornerRadius = _Computed(function(sc: number): UDim
							return UDim.new(0, sc * SHAPE_DP)
						end, scaleState),
					}),
					_bind(maid:GiveTask(Util.Container.ColdFusion.new()))({
						LayoutOrder = 1,
						Children = {
							_new("ImageLabel")({
								Size = _Computed(function(sc: number): UDim2
									return UDim2.fromOffset(sc * ICON_SIZE_DP, sc * ICON_SIZE_DP)
								end, scaleState),
								Visible = _Computed(function(i: ImageData?): boolean
									return i ~= nil
								end, iconState),
								BackgroundTransparency = 1,
								ImageColor3 = headlineColorState,
								Image = _Computed(function(i: ImageData?): string
									return if i then i.Image else ""
								end, iconState),
								ImageRectOffset = _Computed(function(i: ImageData?): Vector2
									return if i then i.ImageRectOffset else Vector2.zero
								end, iconState),
								ImageRectSize = _Computed(function(i: ImageData?): Vector2
									return if i then i.ImageRectSize else Vector2.zero
								end, iconState),
							}),
							maid:GiveTask(Util.List.ColdFusion.center()),
						},
					}),
					maid:GiveTask(Util.Padding.ColdFusion.new(
						_Computed(function(sc: number): UDim
							return UDim.new(0, sc * PADDING_DP)
						end, scaleState),
						_Computed(function(sc: number): UDim
							return UDim.new(0, sc * PADDING_DP)
						end, scaleState)
					)) :: Instance,
					_new("TextLabel")({
						Text = headlineState,
						LayoutOrder = 1,
						Visible = _Computed(function(h: string?): boolean
							return not (h == nil or h:len() == 0)
						end, headlineState),
						TextColor3 = headlineColorState,
						BackgroundTransparency = 1,
						TextXAlignment = _Computed(function(i: ImageData?): Enum.TextXAlignment
							return if i then Enum.TextXAlignment.Center else Enum.TextXAlignment.Left
						end, iconState),
						AutomaticSize = Enum.AutomaticSize.XY,
						TextSize = _Computed(function(f: FontData, sc: number): number
							return Typography.getTextSize(f.Size, sc)
						end, headlineFontDataState, scaleState),
						LineHeight = _Computed(function(f: FontData, sc: number): number
							return Typography.getGuiLineHeight(f.LineHeight, f.Size)
						end, headlineFontDataState, scaleState),
						FontFace = _Computed(function(f: FontData): Font
							return f.Font
						end, headlineFontDataState),
						Size = UDim2.fromOffset(0, 0),
					}),
					_new("TextLabel")({
						Text = descriptionState,
						LayoutOrder = 2,
						Visible = _Computed(function(d: string?): boolean
							return not (d == nil or d:len() == 0)
						end, descriptionState),
						TextColor3 = descriptionColorState,
						BackgroundTransparency = 1,
						AutomaticSize = Enum.AutomaticSize.XY,
						TextWrapped = true,
						TextXAlignment = Enum.TextXAlignment.Left,
						TextSize = _Computed(function(f: FontData, sc: number): number
							return Typography.getTextSize(f.Size, sc)
						end, bodyFontDataState, scaleState),
						LineHeight = _Computed(function(f: FontData, sc: number): number
							return Typography.getGuiLineHeight(f.LineHeight, f.Size)
						end, bodyFontDataState, scaleState),
						FontFace = _Computed(function(f: FontData): Font
							return f.Font
						end, bodyFontDataState),
						Size = UDim2.fromOffset(0, 0),
						Children = {
							_new("UISizeConstraint")({
								MinSize = _Computed(function(sc: number): Vector2
									return Vector2.new(sc * MIN_DESC_WIDTH_DP, 0)
								end, scaleState),
							}),
						},
					}),
					buttonContainer,
				},
			}),
		},
	}) :: GuiObject

	for i = 1, MAX_BUTTON_COUNT do
		local buttonDataState = _Computed(function(bList: { ButtonData }): ButtonData?
			if #bList > MAX_BUTTON_COUNT then
				warn("dialogs have a max limit of 2 buttons")
			end
			return bList[i]
		end, buttonsState)

		_bind(maid:GiveTask(Button.new(
			_Computed(function(bData: ButtonData?): () -> ()
				return if bData then bData.OnClick else function() end
			end, buttonDataState),
			_Computed(function(bData: ButtonData?): string
				return if bData then bData.Text or "" else ""
			end, buttonDataState),
			_Computed(function(bData: ButtonData?): ImageData?
				return if bData then bData.Icon else nil
			end, buttonDataState),
			buttonTextColorState,
			disabledButtonTextColorState,
			_Computed(function(bData: ButtonData?): boolean
				return if bData then bData.Enabled else false
			end, buttonDataState),
			ELEVATION,
			schemeTypeState,
			buttonFontDataState,
			scaleState
		)))({
			LayoutOrder = i,
			Visible = _Computed(function(bData: ButtonData?): boolean
				return bData ~= nil
			end, buttonDataState),
			Parent = buttonContainer,
		})
	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
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 = {
		BUTTONS = {},
		ICON = nil :: ImageData?,
		HEADLINE = "",
		DESCRIPTION = "",
		SURFACE_COLOR = Color3.new(),
		BUTTON_TEXT_COLOR = Color3.new(),
		DISABLED_TEXT_COLOR = Color3.new(),
		HEADLINE_COLOR = Color3.new(),
		DESCRIPTION_COLOR = Color3.new(),
		SCRIM_COLOR = Color3.new(),
		SCHEME_TYPE = Enums.SchemeType.Light,
		HEADLINE_FONT_DATA = Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14),
		BODY_FONT_DATA = Types.FontData.new(Font.fromEnum(Enum.Font.SourceSans), 14),
		BUTTON_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)),
		BUTTONS = {},
		ICON = nil :: ImageData?,
		HEADLINE = "",
		DESCRIPTION = "",
	},
	SECONDARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		BUTTONS = {},
		ICON = nil :: ImageData?,
		HEADLINE = "",
		DESCRIPTION = "",
	},
	TERTIARY = {
		STYLE = Style.new(1, Enum.Font.SourceSans, "Light", Color3.new(0, 0.4, 0.7)),
		BUTTONS = {},
		ICON = nil :: ImageData?,
		HEADLINE = "",
		DESCRIPTION = "",
	},
}


--!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(
	buttons: FusionCanBeState<{ ButtonData }>,
	icon: FusionCanBeState<ImageData?>,
	headline: FusionCanBeState<string?>,
	description: FusionCanBeState<string?>,
	surfaceColor: FusionCanBeState<Color3>,
	buttonTextColor: FusionCanBeState<Color3>,
	disabledTextColor: FusionCanBeState<Color3>,
	headlineColor: FusionCanBeState<Color3>,
	descriptionColor: FusionCanBeState<Color3>,
	scrimColor: FusionCanBeState<Color3>,
	schemeType: FusionCanBeState<Enums.SchemeType>,
	headlineFontData: FusionCanBeState<FontData>,
	bodyFontData: FusionCanBeState<FontData>,
	buttonFontData: 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(buttons, DEFAULTS.NEW.BUTTONS),
		convert(icon, DEFAULTS.NEW.ICON),
		convert(headline, DEFAULTS.NEW.HEADLINE),
		convert(description, DEFAULTS.NEW.DESCRIPTION),
		convert(surfaceColor, DEFAULTS.NEW.SURFACE_COLOR),
		convert(buttonTextColor, DEFAULTS.NEW.BUTTON_TEXT_COLOR),
		convert(disabledTextColor, DEFAULTS.NEW.DISABLED_TEXT_COLOR),
		convert(headlineColor, DEFAULTS.NEW.HEADLINE_COLOR),
		convert(descriptionColor, DEFAULTS.NEW.DESCRIPTION_COLOR),
		convert(scrimColor, DEFAULTS.NEW.SCRIM_COLOR),
		convert(schemeType, DEFAULTS.NEW.SCHEME_TYPE),
		convert(headlineFontData, DEFAULTS.NEW.HEADLINE_FONT_DATA),
		convert(bodyFontData, DEFAULTS.NEW.BODY_FONT_DATA),
		convert(buttonFontData, DEFAULTS.NEW.BUTTON_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>,
	buttons: FusionCanBeState<{ ButtonData }>,
	icon: FusionCanBeState<ImageData?>,
	headline: FusionCanBeState<string?>,
	description: FusionCanBeState<string?>
): 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(buttons, DEFAULTS.PRIMARY.BUTTONS),
		convert(icon, DEFAULTS.PRIMARY.ICON),
		convert(headline, DEFAULTS.PRIMARY.HEADLINE),
		convert(description, DEFAULTS.PRIMARY.DESCRIPTION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.secondary(
	style: FusionCanBeState<Style>,
	buttons: FusionCanBeState<{ ButtonData }>,
	icon: FusionCanBeState<ImageData?>,
	headline: FusionCanBeState<string?>,
	description: FusionCanBeState<string?>
): 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(buttons, DEFAULTS.SECONDARY.BUTTONS),
		convert(icon, DEFAULTS.SECONDARY.ICON),
		convert(headline, DEFAULTS.SECONDARY.HEADLINE),
		convert(description, DEFAULTS.SECONDARY.DESCRIPTION)
	)
	maid:GiveTask(inst.Destroying:Connect(function()
		maid:Destroy()
	end))
	return inst
end

function Interface.tertiary(
	style: FusionCanBeState<Style>,
	buttons: FusionCanBeState<{ ButtonData }>,
	icon: FusionCanBeState<ImageData?>,
	headline: FusionCanBeState<string?>,
	description: FusionCanBeState<string?>
): 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(buttons, DEFAULTS.TERTIARY.BUTTONS),
		convert(icon, DEFAULTS.TERTIARY.ICON),
		convert(headline, DEFAULTS.TERTIARY.HEADLINE),
		convert(description, DEFAULTS.TERTIARY.DESCRIPTION)
	)
	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 NewDialog = React.Component:extend("NewDialog")
	NewDialog.defaultProps = {
		buttons = DEFAULTS.NEW.BUTTONS,
		icon = DEFAULTS.NEW.ICON,
		headline = DEFAULTS.NEW.HEADLINE,
		description = DEFAULTS.NEW.DESCRIPTION,
		surfaceColor = DEFAULTS.NEW.SURFACE_COLOR,
		buttonTextColor = DEFAULTS.NEW.BUTTON_TEXT_COLOR,
		disabledTextColor = DEFAULTS.NEW.DISABLED_TEXT_COLOR,
		headlineColor = DEFAULTS.NEW.HEADLINE_COLOR,
		descriptionColor = DEFAULTS.NEW.DESCRIPTION_COLOR,
		scrimColor = DEFAULTS.NEW.SCRIM_COLOR,
		schemeType = DEFAULTS.NEW.SCHEME_TYPE,
		headlineFontData = DEFAULTS.NEW.HEADLINE_FONT_DATA,
		bodyFontData = DEFAULTS.NEW.BODY_FONT_DATA,
		buttonFontData = DEFAULTS.NEW.BUTTON_FONT_DATA,
		scale = DEFAULTS.NEW.SCALE,
	}
	function NewDialog:init(initialProps: { [string]: unknown })
		self._maid = Maid.new()
		local _fuse = ColdFusion.fuse(self._maid)
		local _Value = _fuse.Value
		self._internalStates = {
			buttons = _Value(self.defaultProps.buttons),
			icon = _Value(self.defaultProps.icon),
			headline = _Value(self.defaultProps.headline),
			description = _Value(self.defaultProps.description),
			surfaceColor = _Value(self.defaultProps.surfaceColor),
			buttonTextColor = _Value(self.defaultProps.buttonTextColor),
			disabledTextColor = _Value(self.defaultProps.disabledTextColor),
			headlineColor = _Value(self.defaultProps.headlineColor),
			descriptionColor = _Value(self.defaultProps.descriptionColor),
			scrimColor = _Value(self.defaultProps.scrimColor),
			schemeType = _Value(self.defaultProps.schemeType),
			headlineFontData = _Value(self.defaultProps.headlineFontData),
			bodyFontData = _Value(self.defaultProps.bodyFontData),
			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.buttons,
			self._internalStates.icon,
			self._internalStates.headline,
			self._internalStates.description,
			self._internalStates.surfaceColor,
			self._internalStates.buttonTextColor,
			self._internalStates.disabledTextColor,
			self._internalStates.headlineColor,
			self._internalStates.descriptionColor,
			self._internalStates.scrimColor,
			self._internalStates.schemeType,
			self._internalStates.headlineFontData,
			self._internalStates.bodyFontData,
			self._internalStates.buttonFontData,
			self._internalStates.scale
		)
	end

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

do
	local PrimaryDialog = React.Component:extend("PrimaryDialog")
	PrimaryDialog.defaultProps = {
		style = DEFAULTS.PRIMARY.STYLE,
		buttons = DEFAULTS.PRIMARY.BUTTONS,
		icon = DEFAULTS.PRIMARY.ICON,
		headline = DEFAULTS.PRIMARY.HEADLINE,
		description = DEFAULTS.PRIMARY.DESCRIPTION,
	}
	function PrimaryDialog: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),
			buttons = _Value(self.defaultProps.buttons),
			icon = _Value(self.defaultProps.icon),
			headline = _Value(self.defaultProps.headline),
			description = _Value(self.defaultProps.description),
		}
		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.buttons,
			self._internalStates.icon,
			self._internalStates.headline,
			self._internalStates.description
		)
	end

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

do
	local SecondaryDialog = React.Component:extend("SecondaryDialog")
	SecondaryDialog.defaultProps = {
		style = DEFAULTS.SECONDARY.STYLE,
		buttons = DEFAULTS.SECONDARY.BUTTONS,
		icon = DEFAULTS.SECONDARY.ICON,
		headline = DEFAULTS.SECONDARY.HEADLINE,
		description = DEFAULTS.SECONDARY.DESCRIPTION,
	}
	function SecondaryDialog: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),
			buttons = _Value(self.defaultProps.buttons),
			icon = _Value(self.defaultProps.icon),
			headline = _Value(self.defaultProps.headline),
			description = _Value(self.defaultProps.description),
		}
		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.buttons,
			self._internalStates.icon,
			self._internalStates.headline,
			self._internalStates.description
		)
	end

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

do
	local TertiaryDialog = React.Component:extend("TertiaryDialog")
	TertiaryDialog.defaultProps = {
		style = DEFAULTS.TERTIARY.STYLE,
		buttons = DEFAULTS.TERTIARY.BUTTONS,
		icon = DEFAULTS.TERTIARY.ICON,
		headline = DEFAULTS.TERTIARY.HEADLINE,
		description = DEFAULTS.TERTIARY.DESCRIPTION,
	}
	function TertiaryDialog: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),
			buttons = _Value(self.defaultProps.buttons),
			icon = _Value(self.defaultProps.icon),
			headline = _Value(self.defaultProps.headline),
			description = _Value(self.defaultProps.description),
		}
		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.buttons,
			self._internalStates.icon,
			self._internalStates.headline,
			self._internalStates.description
		)
	end

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

return Interface