import React, { Component } from 'react'
import { Link, Route, Switch } from 'react-router-dom'
import { connect } from 'react-redux'
import styled from 'styled-components'
import { logout } from '../utils/Auth'
import RouteList from './RouteList'
import RouteDetail from './RouteDetail'
import StopList from './StopList'
import StopForm from './StopForm'
import RouteForm from './RouteForm'
import Breadcrumb from './Breadcrumb'
import { polygonReset } from '../actions'
import store from '../store'
const StyledLink = styled(Link)`
&[data-active] {
color: red;
}
`
const StyledLRPaddingNav = styled.nav`
padding-right: 10px;
padding-left: 0;
margin-bottom: 5px !important;
`
const StyledFloatPane = styled.div`
min-width: 300px;
height: 100%;
width: 25vw;
z-index: 30;
background: #fefefefe;
border-radius: 0 5px 5px 0;
position: fixed;
left: ${props => props.hidePane ? '-500px' : 0};
top: 0px;
`
const StyledPaneToggler = styled.div`
width: 20px
height: 30px;
background: #fefefefe;
color: #209cee;
position: fixed;
text-align: center;
left: ${props => props.hidePane ? 0 : '25vw'};
top: 30px;
border-radius: 0 5px 5px 0;
@media (max-width: 1200px) {
left: ${props => props.hidePane ? 0 : '300px'};
}
`
const StyledScrollY = styled.div`
height: 100vh;
overflow: auto;
padding-bottom: 5rem;
`
const SimpleAgencyList = (props) => (
)
class FloatPane extends Component {
state = { hidePane: false, breadcrumb: {} }
renderTopLevel(loggedIn) {
return (
)
}
togglePane() {
this.setState({ hidePane: !this.state.hidePane })
}
handleChildMatchParams(params) {
this.setState({ breadcrumb: params })
}
render () {
const { loggedIn, agency } = this.props
const { hidePane } = this.state
const { results } = agency
return (
{this.renderTopLevel(loggedIn)}
(
)} />
(
)} />
(
)} />
(
)} />
(
)} />
(
)} />
(
)} />
)
}
}
const mapStateToProps = state => ({
agency: state.agency,
})
export default connect(
mapStateToProps
)(FloatPane)