<script setup lang="ts">
import { computed } from 'vue'
import type { UiGridColumn } from '../../../shared/ui/adapter/contracts'
import DataGridShell from '../../../shared/ui/DataGridShell.vue'
import type { DataQualityRun } from '../schema'

// Template fixture only. Production data must come from DAT-03 and pass Zod validation.
const rows: DataQualityRun[] = []
const columns = computed<UiGridColumn[]>(() => [
  { field: 'source', header: 'Source' },
  { field: 'session', header: 'Session' },
  { field: 'status', header: 'DQ' },
  { field: 'rowCount', header: 'Rows' },
  { field: 'failedRows', header: 'Failed' },
  { field: 'sourceWatermark', header: 'Watermark' },
  { field: 'datasetId', header: 'Dataset' },
  { field: 'completedAt', header: 'Completed' }
])
</script>

<template>
  <main>
    <header>
      <h1>데이터 품질 운영</h1>
      <p>Raw→PIT→DQ→Dataset lineage를 확인합니다. QUARANTINED 데이터는 추천에 사용할 수 없습니다.</p>
    </header>
    <DataGridShell
      :rows="rows"
      :columns="columns"
      empty-message="DAT-03 계약이 구현되면 서버 검증 결과가 표시됩니다."
    />
  </main>
</template>
