"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.libAlias = exports.jestModuleNameMapper = void 0;
// the reason for alias at the time was code tree shaking
// tree shaking was most compactable with ES module system
// FIXME: But there is a posiblity when these  package  does not have lib,
//  app will work because of alias, But may be jest won't work because of not alais
//  So need to think about use alais in jest 
const libAlias = {
  '@zohodesk/components/lib': '@zohodesk/components/es',
  // '@zohodesk/zc-custom/lib': '@zohodesk/zc-custom/es',
  '@zohodesk/dot/lib': '@zohodesk/dot/es',
  '@zohodesk/i18n/lib': '@zohodesk/i18n/es',
  '@zohodesk/icons/lib': '@zohodesk/icons/es',
  '@zohodesk/normalizer/lib': '@zohodesk/normalizer/es',
  '@zohodesk/perf-components/lib': '@zohodesk/perf-components/es',
  '@zohodesk/perf-middleware/lib': '@zohodesk/perf-middleware/es',
  '@zohodesk/permissions/lib': '@zohodesk/permissions/es',
  '@zohodesk/platform-middleware/lib': '@zohodesk/platform-middleware/es',
  '@zohodesk/react-dnd/lib': '@zohodesk/react-dnd/es',
  '@zohodesk/router-middleware/lib': '@zohodesk/router-middleware/es',
  '@zohodesk/storage/lib': '@zohodesk/storage/es',
  '@zohodesk/svg/lib': '@zohodesk/svg/es',
  '@zohodesk/timetracker/lib': '@zohodesk/timetracker/es',
  '@zohodesk/variables/lib': '@zohodesk/variables/es',
  '@zohodesk/virtualizer/lib': '@zohodesk/virtualizer/es'
}; //   '^@root(.*)$': '<rootDir>/src$1',
// '^@components(.*)$': '<rootDir>/src/components$1',

exports.libAlias = libAlias;
const jestModuleNameMapper = Object.keys(libAlias).reduce((previousValue, key) => {
  previousValue[`^${key}(.*)$`] = `${libAlias[key]}$1`;
  return previousValue;
}, {});
exports.jestModuleNameMapper = jestModuleNameMapper;