<script lang="ts">
	import { extractDate } from "$lib/funcs";

    export let title: string = "";
    export let location: string = "";
    export let description: string = "";
    export let isConfirmation: boolean = false;
    export let date: Date = new Date();
    export let duration: number = 0;
    export let time: string = "";
</script>


<article class="bottom-margin">
    <h5>{title}</h5>
    <p><i>pin_drop</i> {location}</p>
    <p><i>description</i> {description}</p>
    <p><i>timer</i> {duration} Min.</p>
    {#if isConfirmation}
        <p><i>event</i> {extractDate(new Date(date))}</p>
        <p><i>schedule</i> {time}</p>
    {/if}
</article>  