/* eslint-disable @atlaskit/design-system/use-primitives-text */
import React from 'react';
import Link from '@atlaskit/link';
import SectionMessage from '@atlaskit/section-message';
function AlternativePackagesMessage({
  alternatePackages
}) {
  if (!alternatePackages) {
    return null;
  }
  if (alternatePackages.length === 1) {
    return /*#__PURE__*/React.createElement("p", null, "Consider using ", /*#__PURE__*/React.createElement(Link, {
      href: alternatePackages[0].link
    }, alternatePackages[0].name), ' ', "instead.");
  }
  return /*#__PURE__*/React.createElement("p", null, "Consider using one of these packages instead:", /*#__PURE__*/React.createElement("ul", null, alternatePackages.map(p =>
  /*#__PURE__*/
  // Ignored via go/ees005
  // eslint-disable-next-line react/jsx-key
  React.createElement("li", null, /*#__PURE__*/React.createElement(Link, {
    href: p.link
  }, p.name)))));
}
export function createEditorUseOnlyNotice(componentName, alternatePackages) {
  return /*#__PURE__*/React.createElement(SectionMessage, {
    title: "Internal Editor Use Only",
    appearance: "error"
  }, /*#__PURE__*/React.createElement("p", null, componentName, " is intended for internal use by the Editor Platform as a plugin dependency of the Editor within your product."), /*#__PURE__*/React.createElement("p", null, "Direct use of this component is not supported."), /*#__PURE__*/React.createElement(AlternativePackagesMessage, {
    alternatePackages: alternatePackages
  }));
}