<MultiList::List @model={{@list}} class="posts-list gh-list {{unless @model "no-posts"}} feature-memberAttribution" data-testid="posts-list" as |list| >
    {{!-- always order as scheduled, draft, remainder --}}
    {{#if (or @model.scheduledInfinityModel (or @model.draftInfinityModel @model.publishedAndSentInfinityModel))}}
        {{#if @model.scheduledInfinityModel}}
            {{#each @model.scheduledInfinityModel as |post|}}
                <list.item @id={{post.id}} class="gh-posts-list-item-group gh-posts-list-item-analytics">
                    <PostsList::ListItemAnalytics
                        @post={{post}}
                        data-test-post-id={{post.id}}
                    />
                </list.item>
            {{/each}}
        {{/if}}
        {{#if (and @model.draftInfinityModel (or (not @model.scheduledInfinityModel) (and @model.scheduledInfinityModel @model.scheduledInfinityModel.reachedInfinity)))}}
            {{#each @model.draftInfinityModel as |post|}}
                <list.item @id={{post.id}} class="gh-posts-list-item-group gh-posts-list-item-analytics">
                    <PostsList::ListItemAnalytics
                        @post={{post}}
                        data-test-post-id={{post.id}}
                    />
                </list.item>
            {{/each}}
        {{/if}}
        {{#if (and @model.publishedAndSentInfinityModel (and (or (not @model.scheduledInfinityModel) @model.scheduledInfinityModel.reachedInfinity) (or (not @model.draftInfinityModel) @model.draftInfinityModel.reachedInfinity)))}}
            {{#each @model.publishedAndSentInfinityModel as |post|}}
                <list.item @id={{post.id}} class="gh-posts-list-item-group gh-posts-list-item-analytics">
                    <PostsList::ListItemAnalytics
                        @post={{post}}
                        data-test-post-id={{post.id}}
                    />
                </list.item>
            {{/each}}
        {{/if}}
    {{else}}
        {{yield}}
    {{/if}}
</MultiList::List>

{{!-- The currently selected item or items are passed to the context menu --}}
<GhContextMenu
    @name="context-menu"
    as |menu|
>
    <PostsList::ContextMenu @menu={{menu}} />
</GhContextMenu>