// Permission analysis rules and patterns
export const permissionRules = {
  // High-risk permissions
  highRiskPermissions: [
    'clipboardRead',
    'clipboardWrite',
    'downloads',
    'notifications',
    'geolocation',
    'camera',
    'microphone',
    'desktopCapture',
    'tabs',
    'webNavigation',
    'webRequest',
    'webRequestBlocking',
    'storage',
    'cookies',
    'history',
    'bookmarks',
    'management',
    'system.display',
    'system.cpu',
    'system.memory',
    'system.storage',
    'system.network'
  ],

  // Medium-risk permissions
  mediumRiskPermissions: [
    'activeTab',
    'alarms',
    'background',
    'contextMenus',
    'debugger',
    'declarativeContent',
    'declarativeNetRequest',
    'declarativeWebRequest',
    'fontSettings',
    'gcm',
    'identity',
    'idle',
    'power',
    'printerProvider',
    'sessions',
    'system.display',
    'system.cpu',
    'system.memory',
    'system.storage',
    'system.network',
    'tabCapture',
    'topSites',
    'unlimitedStorage',
    'webNavigation'
  ],

  // Suspicious permission combinations
  suspiciousCombinations: [
    ['clipboardRead', 'clipboardWrite'],
    ['camera', 'microphone'],
    ['geolocation', 'notifications'],
    ['tabs', 'webNavigation'],
    ['webRequest', 'webRequestBlocking'],
    ['storage', 'cookies'],
    ['history', 'bookmarks'],
    ['system.display', 'system.cpu', 'system.memory']
  ],

  // Permission categories
  categories: {
    privacy: ['clipboardRead', 'clipboardWrite', 'camera', 'microphone', 'geolocation'],
    system: ['system.display', 'system.cpu', 'system.memory', 'system.storage', 'system.network'],
    browsing: ['tabs', 'webNavigation', 'history', 'bookmarks', 'cookies'],
    notifications: ['notifications', 'alarms'],
    storage: ['storage', 'unlimitedStorage'],
    network: ['webRequest', 'webRequestBlocking', 'declarativeNetRequest']
  },

  // Weighting system for risk assessment
  weights: {
    highRisk: 3,
    mediumRisk: 2,
    suspiciousCombination: 4,
    categoryMatch: 1
  },

  // Risk thresholds
  thresholds: {
    high: 5,
    medium: 3,
    low: 1
  },

  // Permission request patterns
  requestPatterns: {
    // Number of permissions that trigger high risk
    highRiskCount: 3,
    // Number of categories that trigger high risk
    highRiskCategories: 2,
    // Time window for suspicious requests (in milliseconds)
    suspiciousTimeWindow: 5000
  }
}; 