Newer
Older
<script lang="ts">
import SingleDialogComponent from "./SingleDialogComponent.svelte";
import type { DialogMap } from "./types";
export let startDialogName: string;
export let dialogs: DialogMap;
function switchDialog(targetDialog: string) {
currentDialog = dialogs[targetDialog];
}
</script>
<SingleDialogComponent
on:switchToDialog={(event) => switchDialog(event.detail)}
/>