import { jsx } from "react/jsx-runtime";
import { ButtonList, AnchorButton } from "@contember/ui";
import { EmptyMessage } from "@contember/react-binding-ui";
import { MiscPageLayout } from "../MiscPageLayout.js";
const ProjectList = (props) => {
  return /* @__PURE__ */ jsx(MiscPageLayout, { heading: "Projects", children: /* @__PURE__ */ jsx(ProjectListButtons, { ...props }) });
};
const ProjectListButtons = (props) => {
  if (props.projects.length === 0) {
    return /* @__PURE__ */ jsx(EmptyMessage, { children: "No projects found" });
  }
  return /* @__PURE__ */ jsx(ButtonList, { display: "block", children: props.projects.map((project) => /* @__PURE__ */ jsx(
    AnchorButton,
    {
      href: props.formatProjectUrl(project),
      distinction: "seamless",
      display: "block",
      justify: "start",
      children: project.name
    },
    project.slug
  )) });
};
export {
  ProjectList,
  ProjectListButtons
};
//# sourceMappingURL=ProjectList.js.map
