<script lang="ts">
    import { RiChatOffLine } from "svelte-remixicon";
    import Centered from "./Centered.svelte";
    import FeedPost from "./FeedPost.svelte";

    let { posts, emptymsg = "No posts, how empty" } = $props();
</script>

<ul>
    {#each posts as post}
    <li><FeedPost {post} /></li>
    {:else}
    <Centered>
        <p class="big"><RiChatOffLine /></p>
        {emptymsg}</Centered>
    {/each}
</ul>

<style>
    ul {
        list-style: none;
        padding: 0;
    }

    ul > li {
        margin: 3px 0;
    }

    p.big {
        font-size: 2em;
    }

</style>