<script lang="ts">
  import type { ProjectDashboardSummary } from '../../lib/api';

  export let summary: ProjectDashboardSummary;

  $: metrics = [
    ['待处理 Inbox', summary.pending_inbox_count],
    ['当前任务', summary.open_task_count],
    ['笔记资料', summary.recent_note_count],
    ['AI 会话', summary.recent_session_count],
  ] as const;
</script>

<section aria-label="项目总览" class="dashboard-grid">
  {#each metrics as [label, value]}
    <article class="dashboard-metric">
      <span>{label}</span>
      <strong>{value}</strong>
    </article>
  {/each}
</section>
