export interface ForbiddenWord {
  id: string
  word: string
  category: 'competitor' | 'sensitive' | 'political' | 'custom'
  strategy: 'mask' | 'replace' | 'block'
  replacement?: string
  fallback_message?: string
  hit_count: number
  is_enabled: boolean
  created_at: string
  updated_at: string
}

export interface ForbiddenWordCreate {
  word: string
  category: 'competitor' | 'sensitive' | 'political' | 'custom'
  strategy: 'mask' | 'replace' | 'block'
  replacement?: string
  fallback_message?: string
  is_enabled?: boolean
}

export interface ForbiddenWordUpdate {
  word?: string
  category?: 'competitor' | 'sensitive' | 'political' | 'custom'
  strategy?: 'mask' | 'replace' | 'block'
  replacement?: string
  fallback_message?: string
  is_enabled?: boolean
}

export interface ForbiddenWordListResponse {
  data: ForbiddenWord[]
}

export interface BehaviorRule {
  id: string
  description: string
  category: 'compliance' | 'tone' | 'boundary' | 'custom'
  is_enabled: boolean
  created_at: string
  updated_at: string
}

export interface BehaviorRuleCreate {
  description: string
  category: 'compliance' | 'tone' | 'boundary' | 'custom'
  is_enabled?: boolean
}

export interface BehaviorRuleUpdate {
  description?: string
  category?: 'compliance' | 'tone' | 'boundary' | 'custom'
  is_enabled?: boolean
}

export interface BehaviorRuleListResponse {
  data: BehaviorRule[]
}

export const WORD_CATEGORY_OPTIONS = [
  { value: 'competitor', label: '竞品名称', color: 'danger' },
  { value: 'sensitive', label: '敏感词', color: 'warning' },
  { value: 'political', label: '政治敏感', color: 'danger' },
  { value: 'custom', label: '自定义', color: 'info' }
]

export const WORD_STRATEGY_OPTIONS = [
  { value: 'mask', label: '脱敏处理', description: '将敏感词替换为 ***' },
  { value: 'replace', label: '替换文本', description: '替换为指定文本' },
  { value: 'block', label: '拦截输出', description: '阻止输出并返回兜底话术' }
]

export const BEHAVIOR_CATEGORY_OPTIONS = [
  { value: 'compliance', label: '合规要求', color: 'danger' },
  { value: 'tone', label: '语气风格', color: 'warning' },
  { value: 'boundary', label: '边界限制', color: 'primary' },
  { value: 'custom', label: '自定义', color: 'info' }
]
