export const constants = {
  // API Configuration
  API_VERSION: process.env.API_VERSION || 'v1',
  BASE_URL: process.env.BASE_URL || 'http://localhost:5000',
  
  // File Upload Configuration
  MAX_FILE_SIZE_MB: parseInt(process.env.MAX_FILE_SIZE_MB || '10', 10),
  MAX_FILE_SIZE_BYTES: parseInt(process.env.MAX_FILE_SIZE_MB || '10', 10) * 1024 * 1024,
  ALLOWED_FILE_TYPES: process.env.ALLOWED_FILE_TYPES?.split(',') || [
    'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'jpg', 'jpeg', 'png', 'gif'
  ],
  
  // TAT Configuration
  TAT_CHECK_INTERVAL_MINUTES: parseInt(process.env.TAT_CHECK_INTERVAL_MINUTES || '30', 10),
  TAT_REMINDER_THRESHOLD_1: parseInt(process.env.TAT_REMINDER_THRESHOLD_1 || '50', 10),
  TAT_REMINDER_THRESHOLD_2: parseInt(process.env.TAT_REMINDER_THRESHOLD_2 || '80', 10),
  
  // Rate Limiting
  RATE_LIMIT_WINDOW_MS: parseInt(process.env.RATE_LIMIT_WINDOW_MS || '900000', 10), // 15 minutes
  RATE_LIMIT_MAX_REQUESTS: parseInt(process.env.RATE_LIMIT_MAX_REQUESTS || '100', 10),
  
  // Pagination
  DEFAULT_PAGE_SIZE: 20,
  MAX_PAGE_SIZE: 100,
  
  // Workflow Limits
  MAX_APPROVAL_LEVELS: 10,
  MAX_PARTICIPANTS_PER_REQUEST: 50,
  
  // Notification Types
  NOTIFICATION_TYPES: {
    WORKFLOW_CREATED: 'WORKFLOW_CREATED',
    WORKFLOW_SUBMITTED: 'WORKFLOW_SUBMITTED',
    APPROVAL_REQUIRED: 'APPROVAL_REQUIRED',
    APPROVAL_COMPLETED: 'APPROVAL_COMPLETED',
    WORKFLOW_APPROVED: 'WORKFLOW_APPROVED',
    WORKFLOW_REJECTED: 'WORKFLOW_REJECTED',
    WORKFLOW_CLOSED: 'WORKFLOW_CLOSED',
    TAT_REMINDER: 'TAT_REMINDER',
    TAT_BREACHED: 'TAT_BREACHED',
    DOCUMENT_UPLOADED: 'DOCUMENT_UPLOADED',
    COMMENT_ADDED: 'COMMENT_ADDED',
    PARTICIPANT_ADDED: 'PARTICIPANT_ADDED',
  },
  
  // Activity Types
  ACTIVITY_TYPES: {
    WORKFLOW_CREATED: 'WORKFLOW_CREATED',
    WORKFLOW_SUBMITTED: 'WORKFLOW_SUBMITTED',
    WORKFLOW_APPROVED: 'WORKFLOW_APPROVED',
    WORKFLOW_REJECTED: 'WORKFLOW_REJECTED',
    WORKFLOW_CLOSED: 'WORKFLOW_CLOSED',
    DOCUMENT_UPLOADED: 'DOCUMENT_UPLOADED',
    DOCUMENT_DELETED: 'DOCUMENT_DELETED',
    COMMENT_ADDED: 'COMMENT_ADDED',
    PARTICIPANT_ADDED: 'PARTICIPANT_ADDED',
    PARTICIPANT_REMOVED: 'PARTICIPANT_REMOVED',
    USER_LOGIN: 'USER_LOGIN',
    USER_LOGOUT: 'USER_LOGOUT',
  },
  
  // Document Categories
  DOCUMENT_CATEGORIES: {
    SUPPORTING: 'SUPPORTING',
    APPROVAL: 'APPROVAL',
    REFERENCE: 'REFERENCE',
    FINAL: 'FINAL',
    OTHER: 'OTHER',
    COMPLETION_DOC: 'COMPLETION_DOC',
    ACTIVITY_PHOTO: 'ACTIVITY_PHOTO',
  },
  
  // Work Note Types
  WORK_NOTE_TYPES: {
    COMMENT: 'COMMENT',
    QUESTION: 'QUESTION',
    CLARIFICATION: 'CLARIFICATION',
    UPDATE: 'UPDATE',
    SYSTEM: 'SYSTEM',
  },
};
