export interface NotificationConfig {
  id: string
  channel: 'email' | 'slack_webhook' | 'teams_webhook'
  webhook_url: string | null
  email_addresses: string[] | null
  is_active: boolean
  events_enabled: Record<string, boolean>
  created_at: string
  updated_at: string
}

export interface NotificationConfigCreate {
  channel: 'email' | 'slack_webhook' | 'teams_webhook'
  webhook_url?: string
  email_addresses?: string[]
  events_enabled?: Record<string, boolean>
}

export interface NotificationConfigUpdate {
  webhook_url?: string
  email_addresses?: string[]
  is_active?: boolean
  events_enabled?: Record<string, boolean>
}

export interface AppNotification {
  id: string
  event: string
  title: string
  body: string | null
  link: string | null
  is_read: boolean
  created_at: string
}

export interface UnreadCount {
  count: number
}

export const NOTIFICATION_EVENTS = {
  'session.escalated': 'Session Escalated',
  'session.high_priority': 'High Priority Session',
  'proposal.pending': 'New Flow Proposal',
  'proposal.approved': 'Proposal Approved',
  'knowledge_gap.detected': 'Knowledge Gap Detected',
} as const

export const CHANNEL_LABELS = {
  email: 'Email',
  slack_webhook: 'Slack',
  teams_webhook: 'Microsoft Teams',
} as const
