{#snippet code(name: string)}{#each runs(name) as run, i (i)}{run}{/each}{/snippet}
{words.setDetails}
{#if grant.calls.length || grant.data.length || grant.spaces.length}

{words.setRequests}

{#if grant.calls.length} {#each grant.calls as { aud, towards, methods } (aud)} {#each methods as method, i (method)} {#if i === 0}{/if} {/each} {/each}
{words.call}{words.towards}
{@render code(method)}{#if typeof towards === 'string'}{towards}{:else}{@render code(towards.code)}{/if}
{/if} {#if grant.data.length} {#each words.actions as action (action)}{/each} {#each grant.data as { collection, actions } (collection)} {#each actions as asked, i (i)}{/each} {/each}
{words.data}{action}
{@render code(collection)}{#if asked}{/if}
{/if} {#each grant.spaces as space, i (i)}

{#each space.heading as part, j (j)}{#if typeof part === 'string'}{part}{:else}{@render code(part.code)}{/if}{/each}

{space.sentence}

{/each} {:else}

{words.setGrantsNothing}

{/if}