import type { ChronicleConfig, ChronicleStatus } from '../use-chronicle'

export const chronicleConfigFixture: ChronicleConfig = {
  profileId: 'provider-openai',
  modelId: 'gpt-5.2',
  workspaceId: 'workspace-cradle',
  enabled: true,
  activityPipelineEnabled: true,
  activityPipelineIntervalMs: 120_000,
  activityPipelineBatchSize: 3,
  dreamSchedulerEnabled: true,
  dreamSchedulerIntervalMs: 86_400_000,
  dreamSchedulerApplyMerge: false,
  audioCaptureEnabled: true,
  audioSource: 'mixed',
  audioSegmentMs: 10_000,
  audioSegmentIntervalMs: 10_000,
  audioRmsThreshold: 0.05,
  storageRoot: '/Users/demo/Library/Application Support/Cradle/chronicle',
  privacySensitiveAppBundleIds: [],
  privacySensitiveTitlePatterns: [],
  privacySensitiveUrlPatterns: [],
  closedEyesDiscardEnabled: true,
  closedEyesMode: 'auto',
}

export const chronicleRunningStatusFixture: ChronicleStatus = {
  available: true,
  running: true,
  pid: 4312,
  lastCaptureAt: 1_784_806_920,
  lastSummaryAt: 1_784_806_700,
  lastErrorAt: null,
  lastError: null,
  lastExitCode: 0,
  lastExitAt: 1_784_714_400,
  totalSnapshots: 1_284,
  totalSummaries: 46,
  totalMessages: 318,
  lastMessageAt: 1_784_806_880,
  totalAccessibilitySnapshots: 592,
  lastAccessibilitySnapshotAt: 1_784_806_920,
  totalAccessibilityEvents: 4_812,
  lastAccessibilityEventAt: 1_784_806_923,
  totalAudioTranscripts: 24,
  lastAudioTranscriptAt: 1_784_806_400,
  totalAudioRawSegments: 196,
  lastAudioRawSegmentAt: 1_784_806_920,
  totalActivitySegments: 82,
  lastActivitySegmentAt: 1_784_806_500,
  totalPipelineRuns: 76,
  lastPipelineRunAt: 1_784_806_520,
  totalKnowledgeCards: 31,
  lastKnowledgeCardAt: 1_784_806_540,
  totalDreamRuns: 12,
  lastDreamRunAt: 1_784_794_800,
  dreamSchedulerEnabled: true,
  dreamSchedulerRunning: false,
  dreamSchedulerIntervalMs: 86_400_000,
  dreamSchedulerApplyMerge: false,
  activityPipelineEnabled: true,
  activityPipelineRunning: true,
  activityPipelineIntervalMs: 120_000,
  activityPipelineBatchSize: 3,
  audioCaptureEnabled: true,
  audioSource: 'mixed',
  audioRuntimeStatus: 'armed',
  configuredModel: 'gpt-5.2',
}

export const chronicleStoppedStatusFixture: ChronicleStatus = {
  ...chronicleRunningStatusFixture,
  running: false,
  pid: null,
  activityPipelineRunning: false,
  audioCaptureEnabled: false,
  audioRuntimeStatus: 'unavailable',
  lastExitCode: 1,
  lastExitAt: 1_784_806_800,
}
