<script lang="ts">
    import {locals} from "../../ts/stores.js";
    import Message from "./Message.svelte";

    export let flashed = $locals.flash();
    console.log('Flashed:', flashed)
</script>

<div class="messages">
    {#if flashed}
        {#each Object.entries(flashed) as [key, bag], i}
            {#each bag as content}
                <Message type={key} content={content}/>
            {/each}
        {/each}
    {/if}
</div>
