<script lang="ts">
  export let account: string;

  $: userInitials = account.slice(0, 2).toUpperCase();
</script>

<footer class="workspace-statusbar" aria-label="Workspace status">
  <section class="statusbar-user" aria-label="Current user">
    <span class="user-avatar" aria-hidden="true">{userInitials}</span>
    <span class="user-meta">
      <strong>{account}</strong>
      <small>在线</small>
    </span>
    <button type="button" aria-label="Friends">好友</button>
    <button type="button" aria-label="Direct messages">私信</button>
    <button type="button" aria-label="Settings">设置</button>
  </section>

  <section class="statusbar-tasks" aria-label="Task status">
    <span>Sync complete</span>
    <span>3 tasks running</span>
    <span>AI queue idle</span>
    <span>Draft saved</span>
  </section>

  <section class="statusbar-system" aria-label="System status">
    <span>本地存储 152GB 可用</span>
    <span>系统健康 正常</span>
  </section>
</footer>
