using fwt::Command
using fwt::Event
using flux::Frame
using afIoc::Inject
class CmdEditEntity : Command {
@Inject private Frame frame
// @Inject private EventHub eventHub
Entity entity
new make(Entity entity, QuickFluxIcons icons, |This| injectInto) : super("Edit ${entity.typeof.name.toDisplayName}") {
injectInto(this)
super.icon = icons.icoCircleArrowRight
this.entity = entity
}
override Void invoked(Event? event) {
frame.load(entity.toEditUri)
// eventHub.fireEvent(Event.)
// FIXME: invoke event
// EntityTreeSideBar tree := frame.sideBar(EntityTreeSideBar#)
// tree.expand(entity)
}
}