import { useProjectSlug } from "@contember/react-client";
import { memo } from "react";
import { LayoutPage } from "@contember/ui";
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
import { EditIdentity } from "../member/EditIdentity.js";
import { NavigateBackButton } from "../../../routing/binding/NavigateBackButton.js";
var _jsxFileName = "/__w/interface/interface/packages/admin/src/tenant/components/pages/EditUserPage.tsx";
const EditUserPage = memo(({
  rolesConfig,
  identityId,
  userListLink = "tenantUsers"
}) => {
  const project = useProjectSlug();
  if (!project) {
    return /* @__PURE__ */ jsxDEV(Fragment, {
      children: "Not in project."
    }, void 0, false);
  }
  return /* @__PURE__ */ jsxDEV(LayoutPage, {
    title: "Edit user",
    navigation: /* @__PURE__ */ jsxDEV(NavigateBackButton, {
      to: userListLink,
      children: "Back to list of users"
    }, void 0, false, {
      fileName: _jsxFileName,
      lineNumber: 22,
      columnNumber: 17
    }, void 0),
    children: /* @__PURE__ */ jsxDEV(EditIdentity, {
      project,
      rolesConfig,
      identityId,
      userListLink
    }, void 0, false, {
      fileName: _jsxFileName,
      lineNumber: 24,
      columnNumber: 5
    }, void 0)
  }, void 0, false, {
    fileName: _jsxFileName,
    lineNumber: 20,
    columnNumber: 4
  }, void 0);
});
const EditUserInProject = EditUserPage;
export {
  EditUserInProject,
  EditUserPage
};
//# sourceMappingURL=EditUserPage.js.map
