{edit ? 'Edit' : 'Create'} Post

{#if !edit}
Community * {#if data.community} {/if}
{ const results = await getClient().search({ q: communitySearch, auth: $authData?.token, type_: 'Communities', limit: 20, listing_type: 'Subscribed', sort: 'Active', }) communities = results.communities.map((c) => c.community) }} debounceTime={600} extractName={(c) => c.title} bind:query={communitySearch} extractSelected={(c) => { if (!c) { data.community = null return } data.community = c.id communitySearch = `${c.name}@${new URL(c.actor_id).hostname}` }} />
{/if}