import { createElement } from "react";
import { ButtonList, AnchorButton } from "@contember/ui";
import { MiscPageLayout } from "../MiscPageLayout.js";
import { EmptyMessage } from "../bindingFacade/collections/helpers/EmptyMessage.js";
const ProjectList = (props) => {
  return /* @__PURE__ */ createElement(MiscPageLayout, {
    heading: "Projects"
  }, /* @__PURE__ */ createElement(ProjectListButtons, {
    ...props
  }));
};
const ProjectListButtons = (props) => {
  if (props.projects.length === 0) {
    return /* @__PURE__ */ createElement(EmptyMessage, null, "No projects found");
  }
  return /* @__PURE__ */ createElement(ButtonList, {
    flow: "block"
  }, props.projects.map((project) => /* @__PURE__ */ createElement(AnchorButton, {
    key: project.slug,
    href: props.formatProjectUrl(project),
    distinction: "seamless",
    flow: "block",
    justification: "justifyStart"
  }, project.name)));
};
export { ProjectList, ProjectListButtons };
//# sourceMappingURL=ProjectList.js.map
