{ let e = detail.detail if (e.event.shiftKey || e.type == 'identity') { selectNextId(e.id) removeAtId($flowStore.value.modules, e.id) $flowStore = $flowStore } else { idToRemove = e.id } }} on:insert={async ({ detail }) => { if (detail.modules) { await insertNewModuleAtIndex(detail.modules, detail.index ?? 0, detail.detail) $flowStore = $flowStore $selectedId = detail.modules[detail.index ?? 0].id } }} on:newBranch={async ({ detail }) => { if (detail.module) { await addBranch(detail.module) $flowStore = $flowStore } }} on:deleteBranch={async ({ detail }) => { if (detail.module) { await removeBranch(detail.module, detail.index) $flowStore = $flowStore $selectedId = detail.module.id } }} />
{ idToRemove = undefined }} on:confirmed={() => { if (idToRemove !== undefined) { selectNextId(idToRemove) removeAtId($flowStore.value.modules, idToRemove) $flowStore = $flowStore idToRemove = undefined } }} />