import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
import { useProjectSlug } from "@contember/react-client";
import { memo } from "react";
import { LayoutPage } from "@contember/ui";
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__ */ 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
      }, globalThis);
    }
    return /* @__PURE__ */ jsxDEV(
      LayoutPage,
      {
        title: "Edit user",
        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
        }, globalThis),
        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
        }, globalThis)
      },
      void 0,
      false,
      {
        fileName: "/__w/interface/interface/packages/admin/src/tenant/components/pages/EditUserPage.tsx",
        lineNumber: 23,
        columnNumber: 4
      },
      globalThis
    );
  }
);
const EditUserInProject = EditUserPage;
export {
  EditUserInProject,
  EditUserPage
};
//# sourceMappingURL=EditUserPage.js.map
