import { jsxDEV, Fragment } from "react/jsx-dev-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__ */ jsxDEV(Fragment, { children: "Not in project." }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/EditUserPage.tsx",
        lineNumber: 20,
        columnNumber: 11
      }, void 0);
    }
    return /* @__PURE__ */ jsxDEV(
      LayoutPage,
      {
        title: /* @__PURE__ */ jsxDEV(Heading, { depth: 1, children: "Edit user" }, void 0, false, {
          fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/EditUserPage.tsx",
          lineNumber: 24,
          columnNumber: 12
        }, void 0),
        navigation: /* @__PURE__ */ jsxDEV(NavigateBackButton, { to: userListLink, children: "Back to list of users" }, void 0, false, {
          fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/EditUserPage.tsx",
          lineNumber: 25,
          columnNumber: 17
        }, void 0),
        children: /* @__PURE__ */ jsxDEV(EditIdentity, { project, rolesConfig, identityId, userListLink }, void 0, false, {
          fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/EditUserPage.tsx",
          lineNumber: 27,
          columnNumber: 5
        }, void 0)
      },
      void 0,
      false,
      {
        fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/EditUserPage.tsx",
        lineNumber: 23,
        columnNumber: 4
      },
      void 0
    );
  }
);
const EditUserInProject = EditUserPage;
export {
  EditUserInProject,
  EditUserPage
};
//# sourceMappingURL=EditUserPage.js.map
