import React from "react"
import LeftContainer from '../LeftContainer/LeftContainer'
import RightContainer from '../RightContainer/RightContainer'
import HeaderComponent from '../../components/CommonComponent/HeaderComponent/HeaderComponent'
import DefaultComponent from '../../components/BreakageComponent/defaultComponent/DefaultComponnet'
import BreakageProductDetail from '../../components/BreakageComponent/BreakageProductDetail/BreakageProductDetail'
require('./index.css')
class BreakageContainer extends React.Component {
    constructor(props){
         super(props)
         this.state={
            showPage:2
         }
    }


    render(){
        let props=this.props;
         return (
             <div className={"BreakageContainer"}>
                    <HeaderComponent headerInfo={props.headerInfo} />
                    <LeftContainer leftInfo={props.headerInfo}/>
                    <RightContainer>
                          {
                             this.getPages() 
                          }
                    </RightContainer>
             </div>
         ) 
    }
    componentDidMount(){
        
    }
    changePage(page){
         this.setState({
             showPage:page
         })
    }
    getPages(){
        let pages=null;
        switch(this.state.showPage){
            case  1 :
                 pages=<DefaultComponent />
                 break;
            case  2 :
                 pages=<BreakageProductDetail />
                 break;
        }
        return pages;
    }
}
export default BreakageContainer