import { classes } from 'common/react'; import { decodeHtmlEntities } from 'common/string'; import { Component, Fragment } from 'inferno'; import { runCommand, winset } from './byond'; import { Box, TitleBar } from './components'; import { Toast } from './components/Toast'; import { UI_DISABLED, UI_INTERACTIVE } from './constants'; import { dragStartHandler, resizeStartHandler } from './drag'; import { releaseHeldKeys } from './hotkeys'; import { createLogger } from './logging'; import { refocusLayout } from './refocus'; import { getRoute } from './routes'; const logger = createLogger('Layout'); export class Layout extends Component { componentDidMount() { refocusLayout(); } render() { const { props } = this; const { state, dispatch } = props; const { config } = state; const route = getRoute(state); if (!route) { return `Component for '${config.interface}' was not found.`; } const RoutedComponent = route.component(); const WrapperComponent = route.wrapper && route.wrapper(); const { scrollable, theme } = route; // Render content let contentElement = (