/**
 * SessionView - Render session projection
 * INV: renders projection only; never mutates domain tables.
 *
 * @module packages/tui/src/components/SessionView
 */

import type { SessionProjection } from '../types.js'

export interface SessionViewProps {
  projection: SessionProjection
}

export function SessionView({ projection }: SessionViewProps): string {
  const lines: string[] = [
    `Session: ${projection.session_id}`,
    `Project: ${projection.project_id}`,
    `Status:  ${projection.status}`,
    `Title:   ${projection.title || '(none)'}`,
    `Tasks:   ${projection.tasks.length}`,
    `Agents:  ${projection.agents.length}`,
    ''
  ]
  return lines.join('\n')
}
