/**
 * 选项配置 - 知识库文档
 */

// 文档类型选项
export const documentTypeOptions = [
  { label: '通用文档', value: 'common' },
  { label: '操作指南', value: 'guide' },
  { label: '解决方案', value: 'solution' },
  { label: '故障排查', value: 'troubleshoot' },
  { label: '流程规范', value: 'process' },
  { label: '技术文档', value: 'technical' },
]

// 文档状态选项
export const documentStatusOptions = [
  { label: '草稿', value: 'draft' },
  { label: '已发布', value: 'published' },
  { label: '已审核', value: 'reviewed' },
  { label: '未通过审核', value: 'rejected' },
]

// 列表类型选项
export const listTypeOptions = [
  { label: '我的', value: 'mine' },
  { label: '全部', value: 'all' },
]

// 获取文档状态文本
export const getDocumentStatusText = (status: string): string => {
  const statusMap: Record<string, string> = {
    draft: '草稿',
    published: '已发布',
    reviewed: '已审核',
    rejected: '未通过审核',
  }
  return statusMap[status] || status
}

// 获取文档状态颜色
export const getDocumentStatusColor = (status: string): string => {
  const colorMap: Record<string, string> = {
    draft: 'gray',
    published: 'blue',
    reviewed: 'green',
    rejected: 'red',
  }
  return colorMap[status] || 'gray'
}

// 获取文档类型文本
export const getDocumentTypeText = (type: string): string => {
  const typeMap: Record<string, string> = {
    common: '通用文档',
    guide: '操作指南',
    solution: '解决方案',
    troubleshoot: '故障排查',
    process: '流程规范',
    technical: '技术文档',
  }
  return typeMap[type] || type
}
