<script lang="ts">
    import {Button, Modal} from "flowbite-svelte";

    export let open: boolean = false;
    export let error: Error | undefined;
</script>

{#if (error instanceof Error)}
    <Modal bind:open title={error.message}>
        <p>{error.stack}</p>
        <Button slot="footer" on:click={() => open = false}>Close</Button>
    </Modal>
{/if}
