import * as React from 'react';
import { NavLink } from 'react-router-dom';
import { SIDEBAR_LIST_GROUP_ITEM_ACTION_CLASS } from '../../components/Sidebar';
import { SiteAdminAlert } from '../../site-admin/SiteAdminAlert';
/**
 * Sidebar for org settings pages
 */
export const OrgAccountSidebar = ({ org, authenticatedUser, className, match }) => {
    if (!org) {
        return null;
    }
    const siteAdminViewingOtherOrg = authenticatedUser && org.viewerCanAdminister && !org.viewerIsMember;
    return (React.createElement("div", { className: `org-account-sidebar ${className || ''}` },
        siteAdminViewingOtherOrg && (React.createElement(SiteAdminAlert, { className: "sidebar__alert" },
            "Viewing settings for ",
            React.createElement("strong", null, org.name))),
        React.createElement("div", { className: "card" },
            React.createElement("div", { className: "card-header" }, "Organization"),
            React.createElement("div", { className: "list-group list-group-flush" },
                React.createElement(NavLink, { to: `${match.url}/profile`, exact: true, className: SIDEBAR_LIST_GROUP_ITEM_ACTION_CLASS }, "Profile")))));
};
//# sourceMappingURL=OrgAccountSidebar.js.map