{ grants = value; }} />

{showScopes ? scopeMode === 'requested' ? $i18n.t('Requested scopes') : $i18n.t('Scopes') : app ? $i18n.t('Configure app') : $i18n.t('Add app')}

{#if showScopes}

{scopeMode === 'requested' ? $i18n.t('Enter the scopes requested by the app.') : app ? $i18n.t('Scopes requested by {{APP_NAME}}', { APP_NAME: name }) : $i18n.t('Review the scopes this app is requesting before adding it.')}

{#if availableScopes.length > 8}
{/if}
{#each filteredScopes as scope (scope)}
{$i18n.t(scopeLabels[scope] ?? scope)} {#if scopeLabels[scope]}
{scope}
{/if}
{ if (scopeMode === 'requested') { manifest.requested_scopes = event.detail ? [...manifest.requested_scopes, scope] : manifest.requested_scopes.filter((s) => s !== scope); scopes = scopes.filter((s) => manifest.requested_scopes.includes(s)); } else { scopes = event.detail ? [...scopes, scope] : scopes.filter((s) => s !== scope); } }} />
{:else}

{scopeQuery ? $i18n.t('No matching scopes.') : $i18n.t('No scopes requested.')}

{/each}
{:else}
{#if loading}
{:else} {#if !manifest} {:else}
{#if manual} {/if}

{url}

{#if app} {/if}
{#if app && !manual} {/if} {#if manifestUpdated}

{$i18n.t('Saving approves the updated app identity and selected scopes.')}

{/if}
{$i18n.t('{{COUNT}} selected', { COUNT: scopes.length })}
{ showGrants = true; }} /> {/if} {#if error}{/if}
{#if app?.configured}{:else if manifest && !app}{:else if !manifest}{/if}
{/if} {/if}