"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createDocumentationLink = createDocumentationLink;
exports.createDocumentationMessageGenerator = createDocumentationMessageGenerator;
function createDocumentationLink(_ref) {
  var name = _ref.name,
    _ref$connector = _ref.connector,
    connector = _ref$connector === void 0 ? false : _ref$connector;
  return ['https://www.algolia.com/doc/api-reference/widgets/', name, '/js/', connector ? '#connector' : ''].join('');
}
function createDocumentationMessageGenerator() {
  for (var _len = arguments.length, widgets = new Array(_len), _key = 0; _key < _len; _key++) {
    widgets[_key] = arguments[_key];
  }
  var links = widgets.map(function (widget) {
    return createDocumentationLink(widget);
  }).join(', ');
  return function (message) {
    return [message, "See documentation: ".concat(links)].filter(Boolean).join('\n\n');
  };
}