/**
 * Utility functions for generating test IDs
 * Replaces legacy ID generation functionality
 */

/**
 * Generate a random test ID string
 * Format: random alphanumeric string (24 characters)
 */
function generateTestId() {
  const chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
  let result = '';
  for (let i = 0; i < 24; i++) {
    result += chars.charAt(Math.floor(Math.random() * chars.length));
  }
  return result;
}

/**
 * Generate a test ID with a specific prefix
 */
function generateTestIdWithPrefix(prefix) {
  return `${prefix}_${generateTestId()}`;
}

/**
 * Generate multiple unique test IDs
 */
function generateTestIds(count) {
  const ids = [];
  for (let i = 0; i < count; i++) {
    ids.push(generateTestId());
  }
  return ids;
}

module.exports = {
  generateTestId,
  generateTestIdWithPrefix,
  generateTestIds,
};