import React from 'react';
import { Link } from 'react-router-dom';
import { RunItHeading } from '@looker/run-it';
import { buildPath, highlightHTML } from '../../utils';
export var DocReferenceItems = (heading, items, api, specKey, pattern) => {
  if (items.length === 0) return React.createElement(React.Fragment, null);
  return React.createElement(React.Fragment, null, React.createElement(RunItHeading, {
    as: "h4"
  }, heading), items.map((item, index) => React.createElement("span", {
    className: "doc-link",
    key: item.name
  }, index ? ', ' : '', React.createElement(Link, {
    to: buildPath(api, item, specKey)
  }, highlightHTML(pattern, item.name)))));
};
//# sourceMappingURL=utils.js.map