<script lang="ts">
	import Editor from "./routes/editor.svelte";
	import * as routes from "./routes";
	import ToastWrapper from "./components/Toast/ToastWrapper.svelte";
	import { route as currentRoute } from "./stores";
</script>

{#if $currentRoute.startsWith("editor")}
	<Editor />
{:else if $currentRoute in routes}
	<svelte:component this={routes[$currentRoute]} />
{/if}

<ToastWrapper />
