2020-05-28 08:51:32 +12:00
|
|
|
<script>
|
2021-03-16 03:00:34 +13:00
|
|
|
import { automationStore } from "builderStore"
|
2020-10-27 01:25:26 +13:00
|
|
|
import Flowchart from "./FlowChart/FlowChart.svelte"
|
2020-05-28 08:51:32 +12:00
|
|
|
|
2020-09-22 00:49:34 +12:00
|
|
|
$: automation = $automationStore.selectedAutomation?.automation
|
2020-05-28 08:51:32 +12:00
|
|
|
function onSelect(block) {
|
2020-10-28 04:28:13 +13:00
|
|
|
automationStore.update(state => {
|
2020-09-12 01:23:31 +12:00
|
|
|
state.selectedBlock = block
|
2020-05-28 08:51:32 +12:00
|
|
|
return state
|
|
|
|
})
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2020-10-27 01:18:34 +13:00
|
|
|
{#if automation}
|
2020-09-22 00:49:34 +12:00
|
|
|
<Flowchart {automation} {onSelect} />
|
2021-03-16 03:00:34 +13:00
|
|
|
{/if}
|