import { useProjectSlug } from "@contember/react-client";
import { memo } from "react";
import { LayoutPage } from "@contember/ui";
import { jsx, Fragment } from "react/jsx-runtime";
import { EditIdentity } from "../member/EditIdentity.js";
import { NavigateBackButton } from "../../../routing/binding/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: "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
