<script lang="ts">
  export type TaskListItem = {
    id: number;
    title: string;
    status: 'open' | 'doing' | 'done';
    assignee?: string;
  };

  export let tasks: TaskListItem[] = [];
</script>

<section aria-label="任务列表" class="task-list">
  {#each tasks as task}
    <article class="task-row">
      <strong>{task.title}</strong>
      <span>{task.status}</span>
      {#if task.assignee}
        <span>{task.assignee}</span>
      {/if}
    </article>
  {/each}
</section>
