{$t('admin.perm_title')}

{ showEntityDropdown = true; }} onblur={() => { setTimeout(() => { showEntityDropdown = false; }, 200); }} placeholder={$t('admin.perm_search_placeholder')} class="w-full rounded border border-input bg-background px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground" /> {#if showEntityDropdown && filteredEntityOptions.length > 0}
{#each filteredEntityOptions as option (option.id)} {/each}
{/if}
{ showTargetDropdown = true; }} onblur={() => { setTimeout(() => { showTargetDropdown = false; }, 200); }} placeholder={$t('admin.perm_search_placeholder')} class="w-full rounded border border-input bg-background px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground" /> {#if showTargetDropdown && filteredTargetOptions.length > 0}
{#each filteredTargetOptions as option (option.id)} {/each}
{/if}
{#if permissions.length > 0}
{#each permissions as perm (perm.id)} {/each}
{$t('admin.perm_entity_column')} {$t('admin.perm_target_column')} {$t('admin.perm_level_column')} {$t('admin.perm_action_column')}
{perm.entityType}: {getEntityName(perm.entityType, perm.entityId)} {perm.targetType}: {getTargetName(perm.targetType, perm.targetId)} {perm.level}
{:else}

{$t('admin.perm_none')}

{/if}