local M=script.Parent.Parent local B=require(M.Creator)local f=B.New local e=M.Components local D={}D.__index=D D.__type="\066\117\116\116\111\110"function D.New(D,M)assert(M.Title,"\066\117\116\116\111\110 - \077\105\115\115\105\110\103 \084\105\116\108\101")M.Callback=M.Callback or function() end local A=(require(e.Element))(M.Title,M.Description,D.Container,true)local n=f("\073\109\097\103\101\076\097\098\101\108",{Image="\114\098\120\097\115\115\101\116\105\100\058\047\047\049\048\055\048\057\055\057\049\052\051\055";Size=UDim2.fromOffset(16,16);AnchorPoint=Vector2.new(1,.5);Position=UDim2.new(1,-10,.5,0),BackgroundTransparency=1,Parent=A.Frame;ThemeTag={ImageColor3="\084\101\120\116"}})B.AddSignal(A.Frame.MouseButton1Click,function()D.Library:SafeCallback(M.Callback)end)return A end return D
local Root = script.Parent.Parent
local Creator = require(Root.Creator)

local New = Creator.New
local Components = Root.Components

local Element = {}
Element.__index = Element
Element.__type = "Button"

function Element:New(Config)
	assert(Config.Title, "Button - Missing Title")
	Config.Callback = Config.Callback or function() end

	local ButtonFrame = require(Components.Element)(Config.Title, Config.Description, self.Container, true)

	local ButtonIco = New("ImageLabel", {
		Image = "rbxassetid://10709791437",
		Size = UDim2.fromOffset(16, 16),
		AnchorPoint = Vector2.new(1, 0.5),
		Position = UDim2.new(1, -10, 0.5, 0),
		BackgroundTransparency = 1,
		Parent = ButtonFrame.Frame,
		ThemeTag = {
			ImageColor3 = "Text",
		},
	})

	Creator.AddSignal(ButtonFrame.Frame.MouseButton1Click, function()
		self.Library:SafeCallback(Config.Callback)
	end)

	return ButtonFrame
end

return Element
