import { jsxDEV } from "react/jsx-dev-runtime";
import { useProjectSlug } from "@contember/react-client";
import { LayoutPage, Heading } from "@contember/ui";
import { memo } from "react";
import { createNotInProjectError } from "./errors.js";
import { NavigateBackButton } from "../../../routing/NavigateBackButton.js";
import { InviteUser } from "../person/InviteUser.js";
const InviteUserPage = memo(({ rolesConfig, userListLink = "tenantUsers", method }) => {
  const project = useProjectSlug();
  if (!project) {
    throw createNotInProjectError();
  }
  return /* @__PURE__ */ jsxDEV(
    LayoutPage,
    {
      title: /* @__PURE__ */ jsxDEV(Heading, { depth: 1, children: "Invite user" }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/InviteUserPage.tsx",
        lineNumber: 26,
        columnNumber: 11
      }, void 0),
      navigation: /* @__PURE__ */ jsxDEV(NavigateBackButton, { to: userListLink, children: "Back to list of users" }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/InviteUserPage.tsx",
        lineNumber: 27,
        columnNumber: 16
      }, void 0),
      children: /* @__PURE__ */ jsxDEV(InviteUser, { project, rolesConfig, userListLink, method }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/InviteUserPage.tsx",
        lineNumber: 29,
        columnNumber: 4
      }, void 0)
    },
    void 0,
    false,
    {
      fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/InviteUserPage.tsx",
      lineNumber: 25,
      columnNumber: 3
    },
    void 0
  );
});
const InviteUserToProject = InviteUserPage;
export {
  InviteUserPage,
  InviteUserToProject
};
//# sourceMappingURL=InviteUserPage.js.map
