"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const reactClient = require("@contember/react-client");
const ui = require("@contember/ui");
const react = require("react");
const errors = require("./errors.cjs");
const NavigateBackButton = require("../../../routing/NavigateBackButton.cjs");
const InviteUser = require("../person/InviteUser.cjs");
const InviteUserPage = react.memo(({ rolesConfig, userListLink = "tenantUsers", method }) => {
  const project = reactClient.useProjectSlug();
  if (!project) {
    throw errors.createNotInProjectError();
  }
  return /* @__PURE__ */ jsxRuntime.jsx(
    ui.LayoutPage,
    {
      title: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { depth: 1, children: "Invite user" }),
      navigation: /* @__PURE__ */ jsxRuntime.jsx(NavigateBackButton.NavigateBackButton, { to: userListLink, children: "Back to list of users" }),
      children: /* @__PURE__ */ jsxRuntime.jsx(InviteUser.InviteUser, { project, rolesConfig, userListLink, method })
    }
  );
});
const InviteUserToProject = InviteUserPage;
exports.InviteUserPage = InviteUserPage;
exports.InviteUserToProject = InviteUserToProject;
//# sourceMappingURL=InviteUserPage.cjs.map
