"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.replaceCssDirTemplate = replaceCssDirTemplate;
exports.replaceCssDirTemplateMapper = replaceCssDirTemplateMapper;
exports.replaceI18nLocalTemplate = replaceI18nLocalTemplate;
exports.replaceI18nLocaleTemplateMapper = replaceI18nLocaleTemplateMapper;

function replaceCssDirTemplate(filePath, cssDirTemplate) {
  return filePath // added for efc and service worker handling
  .replaceAll('[dir]', cssDirTemplate).replace('.ltr.css', `.${cssDirTemplate}.css`);
}

function replaceCssDirTemplateMapper(assets, cssDirTemplate) {
  return assets.map(filePath => replaceCssDirTemplate(filePath, cssDirTemplate));
}

function replaceI18nLocalTemplate(filePath, localeTemplate) {
  return filePath // added for efc and service worker handling
  .replaceAll('[locale]', localeTemplate);
}

function replaceI18nLocaleTemplateMapper(assets, localeTemplate) {
  return assets.map(filePath => replaceI18nLocalTemplate(filePath, localeTemplate));
}