"use strict";

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

var _path = _interopRequireDefault(require("path"));

var _removeHashFromFileName = require("./removeHashFromFileName");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function createInitialEntriesForManifestJson(initialFileNames, hashLength) {
  const initialEntries = {};
  initialFileNames.forEach(filename => {
    const fileName = _path.default.parse(filename).base;

    const filenameNameWithoutHash = (0, _removeHashFromFileName.removeHashFromFileName)(fileName, hashLength);
    initialEntries[filenameNameWithoutHash] = fileName;
  });
  return initialEntries;
}