// Runtime constants and helpers shared across projects

const ROLE_PERMISSIONS = {
  admin: [
    'admin:panel:access',
    'users:create',
    'users:read',
    'users:update',
    'users:delete',
    'employees:create',
    'settings:read',
    'settings:update',
    'employees:read',
    'employees:update',
    'skills:read',
    'skills:update'
  ],
  superuser: [
    'admin:panel:access',
    'users:read',
    'employees:create',
    'employees:read',
    'employees:update',
    'skills:read',
    'skills:update'
  ],
  user: [
    'employees:read',
    'skills:read'
  ]
}

module.exports = {
  ROLE_PERMISSIONS,
  DEFAULT_SKILLS: {
    general: [
      'Teamarbeit',
      'Kommunikation',
      'Projektmanagement'
    ],
    it: [
      'JavaScript',
      'TypeScript',
      'Node.js',
      'SQL'
    ],
    certificates: [
      'Erste Hilfe',
      'Brandschutzhelfer'
    ],
    weapons: [
      'WBK A',
      'WBK B'
    ]
  }
}

// Re-export skill constants
try {
  const { LANGUAGE_LEVELS, SKILL_HIERARCHY } = require('./skills')
  module.exports.LANGUAGE_LEVELS = LANGUAGE_LEVELS
  module.exports.SKILL_HIERARCHY = SKILL_HIERARCHY
} catch (e) {
  // no-op if skills.js not present
}
