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