"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getPictureSrcSet = exports["default"] = void 0;

/**
 * ```
 * getPictureSrcSet(images, resolution, imageName, extension, sizes) => `
 *  public/path/file@1x.hash.extension,
 *  public/path/file@2x.hash.extension 2x,
 *  public/path/file@3x.hash.extension 3x`
 * `
 * ```
 */
var getPictureSrcSet = function getPictureSrcSet(images, resolution, imageName, extension, sizes) {
  return sizes.map(function (size) {
    var srcSetItem = images["./".concat(resolution, "/").concat(imageName, "@").concat(size, ".").concat(extension)];

    if (size !== '1x') {
      return "".concat(srcSetItem, " ").concat(size);
    }

    return srcSetItem;
  }).join(',\n');
};

exports.getPictureSrcSet = getPictureSrcSet;
var _default = getPictureSrcSet;
exports["default"] = _default;