"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.replaceCssDirTemplate = replaceCssDirTemplate;
exports.replaceCssDirTemplateMapper = replaceCssDirTemplateMapper;
exports.strFunctionTempalteToReplaceCssDir = void 0;

function replaceCssDirTemplate(filePath, cssDirTemplate) {
  return filePath.endsWith('.ltr.css') ? // ? cssPath.replace('.ltr.css', '.{{--dir}}.css')
  filePath.replace('.ltr.css', `.${cssDirTemplate}.css`) : filePath;
}

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

const strFunctionTempalteToReplaceCssDir = cssDirTemplate => `function replaceCssDirTemplate(filePath, cssDirTemplate) {
  return filePath.endsWith(".ltr.css")
    ? // ? cssPath.replace('.ltr.css', '.{{--dir}}.css')
      filePath.replace(".ltr.css", ".${cssDirTemplate}.css")
    : filePath;
}`;

exports.strFunctionTempalteToReplaceCssDir = strFunctionTempalteToReplaceCssDir;