import { jsx, Fragment } from "react/jsx-runtime";
import { useProjectSlug } from "@contember/react-client";
import { LayoutPage, Heading } from "@contember/ui";
import { memo } from "react";
import { EditIdentity } from "../member/EditIdentity.js";
import { NavigateBackButton } from "../../../routing/NavigateBackButton.js";
const EditUserPage = memo(
  ({ rolesConfig, identityId, userListLink = "tenantUsers" }) => {
    const project = useProjectSlug();
    if (!project) {
      return /* @__PURE__ */ jsx(Fragment, { children: "Not in project." });
    }
    return /* @__PURE__ */ jsx(
      LayoutPage,
      {
        title: /* @__PURE__ */ jsx(Heading, { depth: 1, children: "Edit user" }),
        navigation: /* @__PURE__ */ jsx(NavigateBackButton, { to: userListLink, children: "Back to list of users" }),
        children: /* @__PURE__ */ jsx(EditIdentity, { project, rolesConfig, identityId, userListLink })
      }
    );
  }
);
const EditUserInProject = EditUserPage;
export {
  EditUserInProject,
  EditUserPage
};
//# sourceMappingURL=EditUserPage.js.map
