"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const reactClient = require("@contember/react-client");
const ui = require("@contember/ui");
const react = require("react");
const EditIdentity = require("../member/EditIdentity.cjs");
const NavigateBackButton = require("../../../routing/NavigateBackButton.cjs");
const EditUserPage = react.memo(
  ({ rolesConfig, identityId, userListLink = "tenantUsers" }) => {
    const project = reactClient.useProjectSlug();
    if (!project) {
      return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Not in project." });
    }
    return /* @__PURE__ */ jsxRuntime.jsx(
      ui.LayoutPage,
      {
        title: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { depth: 1, children: "Edit user" }),
        navigation: /* @__PURE__ */ jsxRuntime.jsx(NavigateBackButton.NavigateBackButton, { to: userListLink, children: "Back to list of users" }),
        children: /* @__PURE__ */ jsxRuntime.jsx(EditIdentity.EditIdentity, { project, rolesConfig, identityId, userListLink })
      }
    );
  }
);
const EditUserInProject = EditUserPage;
exports.EditUserInProject = EditUserInProject;
exports.EditUserPage = EditUserPage;
//# sourceMappingURL=EditUserPage.cjs.map
