"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const ui = require("@contember/ui");
const reactBindingUi = require("@contember/react-binding-ui");
const MiscPageLayout = require("../MiscPageLayout.cjs");
const ProjectList = (props) => {
  return /* @__PURE__ */ jsxRuntime.jsx(MiscPageLayout.MiscPageLayout, { heading: "Projects", children: /* @__PURE__ */ jsxRuntime.jsx(ProjectListButtons, { ...props }) });
};
const ProjectListButtons = (props) => {
  if (props.projects.length === 0) {
    return /* @__PURE__ */ jsxRuntime.jsx(reactBindingUi.EmptyMessage, { children: "No projects found" });
  }
  return /* @__PURE__ */ jsxRuntime.jsx(ui.ButtonList, { display: "block", children: props.projects.map((project) => /* @__PURE__ */ jsxRuntime.jsx(
    ui.AnchorButton,
    {
      href: props.formatProjectUrl(project),
      distinction: "seamless",
      display: "block",
      justify: "start",
      children: project.name
    },
    project.slug
  )) });
};
exports.ProjectList = ProjectList;
exports.ProjectListButtons = ProjectListButtons;
//# sourceMappingURL=ProjectList.cjs.map
