local g="\078\101\120\117\115\080\108\117\103\105\110\066\117\116\116\111\110"local A=(require(script.Parent.Parent:WaitForChild("\078\101\120\117\115\080\108\117\103\105\110\070\114\097\109\101\119\111\114\107\080\114\111\106\101\099\116"))):GetContext(script)local I=A:GetResource("\066\097\115\101\046\078\101\120\117\115\087\114\097\112\112\101\100\073\110\115\116\097\110\099\101")local O=A:GetResource("\078\101\120\117\115\073\110\115\116\097\110\099\101\046\069\118\101\110\116\046\078\101\120\117\115\069\118\101\110\116\067\114\101\097\116\111\114")local Y=I:Extend()Y:SetClassName(g)A:SetContextResource(Y)function Y.__new(z,A,I,O,Y)if not I then error("\066\117\116\116\111\110 \110\097\109\101 \099\097\110\'\116 \098\101 \110\105\108\046")end O=O or""Y=Y or""local q=A.Toolbar:CreateButton(I,O,Y)z:InitializeSuper(q)z.Name=g z:__SetChangedOverride("\066\117\116\116\111\110",function() end)z.Button=q z:__SetChangedOverride("\065\099\116\105\118\101",function()z.Button:SetActive(z.Active)end)z.Active=false end return Y
--[[
TheNexusAvenger

Mirrors the API of Roblox's PluginButton class.
--]]

local CLASS_NAME = "NexusPluginButton"



local NexusPluginFramework = require(script.Parent.Parent:WaitForChild("NexusPluginFrameworkProject")):GetContext(script)
local NexusWrappedInstance = NexusPluginFramework:GetResource("Base.NexusWrappedInstance")
local NexusEventCreator = NexusPluginFramework:GetResource("NexusInstance.Event.NexusEventCreator")

local NexusPluginButton = NexusWrappedInstance:Extend()
NexusPluginButton:SetClassName(CLASS_NAME)
NexusPluginFramework:SetContextResource(NexusPluginButton)



--[[
Creates a Nexus Plugin Button object.
--]]
function NexusPluginButton:__new(Toolbar,ButtonName,ButtonTooltip,ButtonIcon)
	--Correct the inputs.
	if not ButtonName then
		error("Button name can't be nil.")
	end
	ButtonTooltip = ButtonTooltip or ""
	ButtonIcon = ButtonIcon or ""
	
	--Create the button.
	local Button = Toolbar.Toolbar:CreateButton(ButtonName,ButtonTooltip,ButtonIcon)
	self:InitializeSuper(Button)
	self.Name = CLASS_NAME
	
	--Store the button.
	self:__SetChangedOverride("Button",function() end)
	self.Button = Button
	
	--Connect the changes.
	self:__SetChangedOverride("Active",function()
		self.Button:SetActive(self.Active)
	end)
	self.Active = false
end



return NexusPluginButton