import MapSearchIcon from 'mdi-react/MapSearchIcon';
import * as React from 'react';
import { Route, Switch } from 'react-router';
import { HeroPage } from '../components/HeroPage';
import { OrgArea } from './area/OrgArea';
import { NewOrganizationPage } from './new/NewOrganizationPage';
const NotFoundPage = () => (React.createElement(HeroPage, { icon: MapSearchIcon, title: "404: Not Found", subtitle: "Sorry, the requested organization page was not found." }));
/**
 * Renders a layout of a sidebar and a content area to display organization-related pages.
 */
export class OrgsArea extends React.Component {
    constructor() {
        super(...arguments);
        this.renderOrgArea = (routeComponentProps) => (React.createElement(OrgArea, Object.assign({}, this.props, routeComponentProps)));
    }
    render() {
        return (React.createElement("div", { className: "orgs-area" },
            React.createElement("div", { className: "orgs-area__content" },
                React.createElement(Switch, null,
                    React.createElement(Route, { path: `${this.props.match.url}/new`, component: NewOrganizationPage, exact: true }),
                    React.createElement(Route, { path: `${this.props.match.url}/:name`, render: this.renderOrgArea }),
                    React.createElement(Route, { component: NotFoundPage })))));
    }
}
//# sourceMappingURL=OrgsArea.js.map