import type {
  ChronicleAudioRawSegment,
  ChronicleAudioTranscript,
} from '../use-chronicle'

export const chronicleAudioTranscriptFixtures: ChronicleAudioTranscript[] = [
  {
    id: 'transcript-completed',
    sourceId: 'audio-capture',
    memoryId: 'memory-design-review',
    title: 'Chronicle architecture review',
    source: 'asr',
    status: 'completed',
    startedAt: '2026-07-23T10:30:00.000Z',
    startedAtUnix: 1_753_267_800,
    endedAt: '2026-07-23T11:10:00.000Z',
    endedAtUnix: 1_753_270_200,
    language: 'en-US',
    appBundleId: 'com.tinyspeck.slackmacgap',
    windowTitle: 'Product design review',
    segmentCount: 18,
    previewText: 'We should keep runtime dependencies in containers and expose typed rendering seams for every frequently inspected surface.',
    segments: [
      {
        id: 'transcript-segment-1',
        segmentIndex: 0,
        startMs: 0,
        endMs: 8_200,
        speakerLabel: 'Speaker 1',
        text: 'We should keep runtime dependencies in containers.',
        confidence: 0.94,
        language: 'en-US',
      },
    ],
  },
  {
    id: 'transcript-recording',
    sourceId: 'audio-capture',
    memoryId: null,
    title: null,
    source: 'asr',
    status: 'recording',
    startedAt: '2026-07-23T11:42:00.000Z',
    startedAtUnix: 1_753_272_120,
    endedAt: null,
    endedAtUnix: null,
    language: 'zh-CN',
    appBundleId: 'com.microsoft.VSCode',
    windowTitle: 'Storybook migration notes',
    segmentCount: 4,
    previewText: '正在把 accessibility 和 audio 表面迁移到纯 props View。',
    segments: [],
  },
  {
    id: 'transcript-imported',
    sourceId: 'manual-import',
    memoryId: null,
    title: 'Customer interview recording',
    source: 'imported',
    status: 'imported',
    startedAt: '2026-07-22T08:15:00.000Z',
    startedAtUnix: 1_753_173_300,
    endedAt: '2026-07-22T08:52:00.000Z',
    endedAtUnix: 1_753_175_520,
    language: null,
    appBundleId: null,
    windowTitle: null,
    segmentCount: 0,
    previewText: '',
    segments: [],
  },
  {
    id: 'transcript-error',
    sourceId: 'audio-capture',
    memoryId: null,
    title: 'Failed transcription',
    source: 'asr',
    status: 'error',
    startedAt: '2026-07-21T17:00:00.000Z',
    startedAtUnix: 1_753_118_000,
    endedAt: '2026-07-21T17:00:03.000Z',
    endedAtUnix: 1_753_118_003,
    language: 'en-US',
    appBundleId: null,
    windowTitle: null,
    segmentCount: 0,
    previewText: 'The transcription provider was unavailable.',
    segments: [],
  },
]

export const chronicleAudioRawSegmentFixtures: ChronicleAudioRawSegment[] = [
  {
    id: 'audio-active',
    sourceId: 'audio-capture',
    recordedAt: '2026-07-23T11:42:00.000Z',
    recordedAtUnix: 1_753_272_120,
    source: 'mixed',
    status: 'processed',
    audioPath: '/Users/demo/Library/Application Support/Cradle/chronicle/audio/audio-active.wav',
    metadataPath: '/Users/demo/Library/Application Support/Cradle/chronicle/audio/audio-active.json',
    sampleRate: 48_000,
    channels: 2,
    sampleCount: 480_000,
    droppedSamples: 0,
    durationMs: 10_000,
    rms: 0.34,
    peak: 0.82,
    active: true,
    vadStatus: 'ready',
    asrStatus: 'ready',
    speakerStatus: 'pending',
    metadata: {},
  },
  {
    id: 'audio-quiet',
    sourceId: 'audio-capture',
    recordedAt: '2026-07-23T11:41:50.000Z',
    recordedAtUnix: 1_753_272_110,
    source: 'microphone',
    status: 'ignored',
    audioPath: '/Users/demo/Library/Application Support/Cradle/chronicle/audio/audio-quiet.wav',
    metadataPath: '/Users/demo/Library/Application Support/Cradle/chronicle/audio/audio-quiet.json',
    sampleRate: 44_100,
    channels: 1,
    sampleCount: 220_500,
    droppedSamples: 16,
    durationMs: 5_000,
    rms: 0.02,
    peak: 0.08,
    active: false,
    vadStatus: 'ready',
    asrStatus: 'not-implemented',
    speakerStatus: 'not-implemented',
    metadata: {},
  },
  {
    id: 'audio-error',
    sourceId: 'system-audio-capture',
    recordedAt: '2026-07-23T11:41:40.000Z',
    recordedAtUnix: 1_753_272_100,
    source: 'system',
    status: 'error',
    audioPath: '/Users/demo/Library/Application Support/Cradle/chronicle/audio/audio-error.wav',
    metadataPath: '/Users/demo/Library/Application Support/Cradle/chronicle/audio/audio-error.json',
    sampleRate: 48_000,
    channels: 2,
    sampleCount: 0,
    droppedSamples: 480_000,
    durationMs: 10_000,
    rms: 0,
    peak: 0,
    active: false,
    vadStatus: 'error',
    asrStatus: 'error',
    speakerStatus: 'error',
    metadata: {},
  },
]
