"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.pathCreator = pathCreator;

var _constants = require("./constants");

function pathCreator(filenameTemplate, compilation, data) {
  return compilation.getAssetPath(filenameTemplate.replace(/\[locale\]/gi, data.locale), {
    hash: data.hash,
    chunk: {
      id: data.chunkId,
      hash: data.chunkHash,
      contentHash: {
        [_constants.MODULE_TYPE]: data.contentHash
      },
      name: data.chunkName
    },
    contentHashType: _constants.MODULE_TYPE
  });
}