type BaseButtonPrototype = {
	set_active: (plugin_button: { read button: PluginToolbarButton }, active: boolean) -> (),
	__index: BaseButtonPrototype
}
type PluginActionButtonPrototype = BaseButtonPrototype & {
	on_trigger: (plugin_action_button: PluginActionButton, f: () -> ()) -> (() -> ()),
 	__index: PluginActionButtonPrototype,
}
export type PluginActionButton = typeof(setmetatable({} :: {
	read button: PluginToolbarButton,
	read action: PluginAction,
	enabled: boolean,
-- type error occurs when the cast happens {} :: PluginActionButtonPrototype
-- the type error wont occur if __index is removed from BaseButtonPrototype
-- TypeError: Code is too complex to typecheck! Consider simplifying the code around this area Luau (1035)
}, {} :: PluginActionButtonPrototype))