import SettingsIcon from 'mdi-react/SettingsIcon';
import TuneVerticalIcon from 'mdi-react/TuneVerticalIcon';
import UserIcon from 'mdi-react/UserIcon';
import * as React from 'react';
import { Link, NavLink } from 'react-router-dom';
import { OrgAvatar } from '../OrgAvatar';
/**
 * Header for the organization area.
 */
export const OrgHeader = (props) => (React.createElement("div", { className: `org-header area-header ${props.className}` },
    React.createElement("div", { className: `${props.className}-inner` }, props.org && (React.createElement(React.Fragment, null,
        React.createElement("h2", { className: "org-header__title" },
            React.createElement(OrgAvatar, { org: props.org.name }),
            ' ',
            React.createElement("span", { className: "org-header__title-text" }, props.org.displayName || props.org.name)),
        React.createElement("div", { className: "area-header__nav" },
            React.createElement("div", { className: "area-header__nav-links" },
                React.createElement(NavLink, { to: `${props.match.url}`, exact: true, className: "btn area-header__nav-link", activeClassName: "area-header__nav-link--active" }, "Overview"),
                React.createElement(NavLink, { to: `${props.match.url}/members`, exact: true, className: "btn area-header__nav-link", activeClassName: "area-header__nav-link--active" },
                    React.createElement(UserIcon, { className: "icon-inline" }),
                    " Members"),
                props.org.viewerCanAdminister && (React.createElement(NavLink, { to: `${props.match.url}/settings`, exact: true, className: "btn area-header__nav-link", activeClassName: "area-header__nav-link--active" },
                    React.createElement(SettingsIcon, { className: "icon-inline" }),
                    " Settings")),
                props.org.viewerCanAdminister && (React.createElement(NavLink, { to: `${props.match.url}/account`, className: "btn area-header__nav-link", activeClassName: "area-header__nav-link--active" },
                    React.createElement(TuneVerticalIcon, { className: "icon-inline" }),
                    " Account"))),
            props.org.viewerPendingInvitation &&
                props.org.viewerPendingInvitation.respondURL && (React.createElement("div", { className: "area-header__nav-actions" },
                React.createElement("small", { className: "area-header__nav-actions-label mr-sm-2" }, "Join organization:"),
                React.createElement(Link, { to: props.org.viewerPendingInvitation.respondURL, className: "btn btn-success btn-sm" }, "View invitation")))))))));
//# sourceMappingURL=OrgHeader.js.map