import React from 'react'
import ReactDOM from 'react-dom'
import DebugPanel from './debug_panel'
import ErrorPanel from './error_panel'
import Splash from './splash'
import GreeterPanel from './greeter_panel'
import MainPanel from './main_panel'
import Wizard from './wizard'
import Addressbook from './addressbook'
import ByeSplash from './bye_splash'
import App from 'app'
import 'lib/common'
export default class PanelSwitcher extends React.Component {
constructor(props) {
super(props)
this.state = {
panel: null,
panel_properties: null,
debug: true,
error: null
}
App.switcher = this
}
showError(error) {
this.setState({error: error})
}
hideError() {
this.setState({error: null})
}
show(component_name, properties={}) {
this.setState({panel: component_name, panel_properties: properties})
}
render() {
let elems = []
if (this.state.error) {
elems.push(