local Q=script.Packages local z=require(Q.Fusion)local p=z.Children local U=z.New local j=z.OnEvent local W=z.Out local K=z.Value local m=(require(Q.FusionPlugin))(z,plugin)local h=m.DockWidget local b=m.Action local t=m.Toolbar local c=m.ToolbarButton local k="\114\098\120\097\115\115\101\116\105\100\058\047\047\055\049\050\048\056\057\055\051\056\051"local i=K(false)local f=plugin:CreatePluginMenu("\099\111\111\108\109\101\110\117","\067\111\111\108 \077\101\110\117","")f:AddAction((b("\099\111\111\108\097\099\116\105\111\110"))({Bindable=true;Icon=k;Text="\067\111\111\108 \065\099\116\105\111\110",Tooltip="\116\104\105\115 \109\101\097\110\115 \111\110\108\121 \103\111\111\100 \116\104\105\110\103\115",[j("\084\114\105\103\103\101\114\101\100")]=function()print("\099\111\111\108 \116\104\105\110\103\115 \117\110\100\101\114\119\097\121\046\046\046\046\046\046\046")end}));(t("\069\120\097\109\112\108\101 \080\108\117\103\105\110"))({(c("\099\111\111\108 \109\101\110\117"))({Active=false,[j("\067\108\105\099\107")]=function()local Q=f:ShowAsync()print(Q and Q.Name)end,ClickableWhenViewportHidden=true;Text="\067\111\111\108";Tooltip="\079\112\101\110 \101\120\097\109\112\108\101 \112\108\117\103\105\110\'\115 \099\111\111\108 \109\101\110\117";Icon=k});(c("\115\101\116\116\105\110\103\115"))({Active=i;[j("\067\108\105\099\107")]=function()i:set(not i:get())end;ClickableWhenViewportHidden=true;Text="\083\101\116\116\105\110\103\115",Tooltip="\079\112\101\110 \101\120\097\109\112\108\101 \112\108\117\103\105\110\'\115 \115\101\116\116\105\110\103\115";Icon=k})});(h("\101\120\097\109\112\108\101\080\108\117\103\105\110\083\101\116\116\105\110\103\115"))({Title="\069\120\097\109\112\108\101 \080\108\117\103\105\110 \083\101\116\116\105\110\103\115",Enabled=i;[W("\069\110\097\098\108\101\100")]=i;[p]=(U("\073\109\097\103\101\076\097\098\101\108"))({Image=k,Size=UDim2.fromScale(1,1)}),Size=Vector2.new(400,300),MinimumSize=Vector2.new(100,100)})
local packages = script.Packages

local Fusion = require(packages.Fusion)
local Children = Fusion.Children
local New = Fusion.New
local OnEvent = Fusion.OnEvent
local Out = Fusion.Out
local Value = Fusion.Value

local FusionPlugin = require(packages.FusionPlugin)(Fusion, plugin)
local DockWidget = FusionPlugin.DockWidget
local Action = FusionPlugin.Action
local Toolbar = FusionPlugin.Toolbar
local ToolbarButton = FusionPlugin.ToolbarButton

local image = "rbxassetid://7120897383"
local open = Value(false) --whetyher the settings widget is open

-- Plugin menu
-- Nothing special here yet :(
local coolmenu = plugin:CreatePluginMenu("coolmenu", "Cool Menu", "")
coolmenu:AddAction(Action "coolaction" {
    Bindable = true,
    Icon = image,
    Text = "Cool Action",
    Tooltip = "this means only good things",

    [OnEvent "Triggered"] = function()
        print("cool things underway.......")
    end,
})

-- Set up toolbar
Toolbar "Example Plugin" {
    -- Cool button
    ToolbarButton "cool menu" {
        Active = false,
        [OnEvent "Click"] = function()
            local r = coolmenu:ShowAsync()
            print(r and r.Name)
        end,
        
        ClickableWhenViewportHidden = true,
        Text = "Cool",
        Tooltip = "Open example plugin's cool menu",
        Icon = image,
    },

    -- Settings button
    ToolbarButton "settings" {
        Active = open,
        [OnEvent "Click"] = function()
            open:set(not open:get())
        end,
        
        ClickableWhenViewportHidden = true,
        Text = "Settings",
        Tooltip = "Open example plugin's settings",
        Icon = image,
    },
}

-- Settings widget
DockWidget ("examplePluginSettings") {
    Title = "Example Plugin Settings",
    Enabled = open,
    [Out "Enabled"] = open,
    [Children] = New "ImageLabel" {
        Image = image,
        Size = UDim2.fromScale(1, 1),
    },

    -- NON-REACTIVE
    Size = Vector2.new(400, 300),
    MinimumSize = Vector2.new(100, 100), --Defaults to .Size
}