{#if !drivesStore.loaded}

{t('common.loading', 'Loading…')}

{:else if !drive}

{t('drive.not_found_title', 'Drive not found')}

{t( 'drive.not_found_body', "This drive doesn't exist or you don't have access to it." )}

{t('drive.back_to_files', 'Back to Files')}
{:else}

{drive.name}

{t('drive.info', 'Drive info')}

{t('drive.field.kind', 'Kind')}
{kindLabel}
{#if drive.default_for_user}
{t('drive.field.default', 'Default')}
{t('drive.field.default_yes', 'This is your home drive')}
{/if}
{t('drive.field.created', 'Created')}
{formatDate(drive.created_at)}
{t('drive.field.updated', 'Last updated')}
{formatDate(drive.updated_at)}
{t('drive.field.id', 'Identifier')}
{drive.id}

{t('drive.storage', 'Storage')}

{formatBytes(drive.used_bytes)}
{t('drive.used', 'Used')}
{drive.quota_bytes && drive.quota_bytes > 0 ? formatBytes(drive.quota_bytes) : '∞'}
{t('drive.quota', 'Quota')}
{drive.quota_bytes && drive.quota_bytes > 0 ? `${Math.round(storagePct)}%` : '—'}
{t('drive.usage', 'Usage')}
{#if drive.quota_bytes && drive.quota_bytes > 0}
{/if}
{#if policyEntries.length > 0}

{t('drive.policies', 'Policies')}

{#each policyEntries as p (p.key)}
{policyLabel(p.key)}
{policyValueDisplay(p.value)}
{/each}
{/if} {/if}