<script>
    import { fly } from "svelte/transition";
    $: message = "Saved";
    $: isVisible = false;
    export function show(amessage = "Saved") {
        message = amessage;
        isVisible = true;
        setTimeout(function () {
            isVisible = false;
        }, 2000);
    }
</script>

{#if isVisible}
        <div class="notice notice-success"   transition:fly={{ duration: 500 }} role="alert">
            <div class="title">Success</div>
            <div class="content">  {message}</div>
        </div>

{/if}

