import type {
  ChronicleKnowledgeCard,
  ChronicleSpeakerProfile,
  MemoryEntry,
} from '../use-chronicle'

export const chronicleMemoryFixtures: MemoryEntry[] = [
  {
    id: 'memory-semantic',
    type: '10min',
    source: 'llm',
    createdAt: '2026-07-23T09:30:00.000Z',
    createdAtUnix: 1_753_264_200,
    content: 'Storybook scenes should mount pure Views with owner-typed fixtures instead of rebuilding runtime decorators.',
    modelId: 'openai/gpt-5',
    matchKind: 'semantic',
    keywordScore: null,
    semanticScore: 0.94,
    title: 'Fixture-driven rendering seam',
    sourceCount: 7,
  },
  {
    id: 'memory-hybrid',
    type: '6h',
    source: 'local',
    createdAt: '2026-07-23T08:00:00.000Z',
    createdAtUnix: 1_753_258_800,
    content: 'Container modules own queries, mutations, routing, Electron access, and runtime state. Views receive props and callbacks.',
    modelId: null,
    matchKind: 'hybrid',
    keywordScore: 0.82,
    semanticScore: 0.88,
    title: 'Container and View ownership',
    sourceCount: 16,
  },
  {
    id: 'memory-imported',
    type: '10min',
    source: 'imported',
    createdAt: '2026-07-22T18:20:00.000Z',
    createdAtUnix: 1_753_209_600,
    content: 'Keep one independently useful semantic production component per file.',
    modelId: null,
    matchKind: 'keyword',
    keywordScore: 1,
    semanticScore: null,
    title: null,
    sourceCount: null,
  },
]

export const chronicleKnowledgeCardFixtures: ChronicleKnowledgeCard[] = [
  {
    id: 'knowledge-decision',
    title: 'Use pure Views for screenshot surfaces',
    content: 'Every frequently reviewed interface must expose a stable props-and-callbacks rendering seam.',
    cardType: 'decision',
    dimension: 'technical',
    confidence: 0.96,
    sourceMemoryIds: ['memory-semantic', 'memory-hybrid'],
    sourceSegmentIds: ['segment-work'],
    sourceChunkIds: [],
    tags: ['storybook', 'architecture', 'frontend'],
    contentHash: 'decision-hash',
    version: 3,
    status: 'active',
    mergedIntoId: null,
    pinned: true,
    metadata: {},
    createdAt: '2026-07-23T10:00:00.000Z',
    createdAtUnix: 1_753_266_000,
    updatedAt: '2026-07-23T11:00:00.000Z',
    updatedAtUnix: 1_753_269_600,
  },
  {
    id: 'knowledge-pattern',
    title: 'Dependency ownership pattern',
    content: 'Queries and platform adapters move upward; typed domain data and callbacks flow into Views.',
    cardType: 'pattern',
    dimension: 'project',
    confidence: 0.89,
    sourceMemoryIds: ['memory-hybrid'],
    sourceSegmentIds: ['segment-work', 'segment-meeting'],
    sourceChunkIds: [],
    tags: ['containers', 'views'],
    contentHash: 'pattern-hash',
    version: 2,
    status: 'archived',
    mergedIntoId: null,
    pinned: false,
    metadata: {},
    createdAt: '2026-07-22T10:00:00.000Z',
    createdAtUnix: 1_753_179_600,
    updatedAt: '2026-07-23T08:30:00.000Z',
    updatedAtUnix: 1_753_260_600,
  },
]

export const chronicleSpeakerProfileFixtures: ChronicleSpeakerProfile[] = [
  {
    id: 'speaker-mina',
    workspaceId: 'workspace-1',
    displayName: 'Mina',
    normalizedLabel: 'mina',
    aliases: ['Mina Chen', 'MC'],
    embedding: null,
    embeddingDimensions: 256,
    embeddingModelId: 'speaker-embed-v2',
    sampleCount: 18,
    lastSeenAt: '2026-07-23T10:42:00.000Z',
    lastSeenAtUnix: 1_753_268_520,
    sourceTranscriptId: 'transcript-1',
    sourceSegmentId: 'segment-meeting',
    metadata: {},
    createdAt: '2026-07-20T08:00:00.000Z',
    createdAtUnix: 1_753_085_600,
    updatedAt: '2026-07-23T10:42:00.000Z',
    updatedAtUnix: 1_753_268_520,
  },
  {
    id: 'speaker-unknown',
    workspaceId: null,
    displayName: 'Speaker 2',
    normalizedLabel: 'speaker-2',
    aliases: [],
    embedding: null,
    embeddingDimensions: null,
    embeddingModelId: null,
    sampleCount: 2,
    lastSeenAt: null,
    lastSeenAtUnix: null,
    sourceTranscriptId: null,
    sourceSegmentId: null,
    metadata: {},
    createdAt: '2026-07-23T09:00:00.000Z',
    createdAtUnix: 1_753_262_400,
    updatedAt: '2026-07-23T09:00:00.000Z',
    updatedAtUnix: 1_753_262_400,
  },
]
