import type { ChronicleMessageSource } from '../use-chronicle'

export const chronicleSlackSourceFixtures: ChronicleMessageSource[] = [
  {
    id: 'slack-events',
    platform: 'slack',
    label: 'Product workspace',
    enabled: true,
    workspaceId: 'workspace-cradle',
    teamId: 'T123456',
    botTokenRef: 'secret://chronicle/slack-events/token',
    channelIds: ['C-PRODUCT', 'C-DESIGN'],
    realtimeMode: 'events-api',
    signingSecretRef: 'secret://chronicle/slack-events/signing-secret',
    status: 'ready',
    lastSyncAt: 1_784_806_400,
    lastMessageAt: 1_784_806_880,
    lastError: null,
    createdAt: 1_784_710_000,
    updatedAt: 1_784_806_880,
  },
  {
    id: 'slack-polling',
    platform: 'slack',
    label: 'Support workspace',
    enabled: true,
    workspaceId: 'workspace-cradle',
    teamId: 'T789012',
    botTokenRef: 'secret://chronicle/slack-polling/token',
    channelIds: ['C-SUPPORT'],
    realtimeMode: 'polling',
    signingSecretRef: null,
    status: 'syncing',
    lastSyncAt: 1_784_805_000,
    lastMessageAt: 1_784_805_400,
    lastError: null,
    createdAt: 1_784_700_000,
    updatedAt: 1_784_805_400,
  },
  {
    id: 'slack-error',
    platform: 'slack',
    label: 'Research archive',
    enabled: true,
    workspaceId: null,
    teamId: null,
    botTokenRef: 'secret://chronicle/slack-error/token',
    channelIds: [],
    realtimeMode: 'events-api',
    signingSecretRef: 'secret://chronicle/slack-error/signing-secret',
    status: 'error',
    lastSyncAt: null,
    lastMessageAt: null,
    lastError: 'Slack rejected the bot token. Update the source credentials and retry.',
    createdAt: 1_784_690_000,
    updatedAt: 1_784_800_000,
  },
]
