import React from 'react';
import '../../content.less';
import LeftTab from '../leftTab.jsx';

import Comprehensive from './comprehensive.jsx';
import Payment from './payment.jsx';
import Correction from './correction.jsx';
import Express from './express.jsx';
import ApplyFee from './applyFee.jsx';


const Content = React.createClass({
    getInitialState() {
        return {
            loading: false,
            leftKey: 'comprehensive',
        };
    },
    handlekey(key) {
        this.setState({
            leftKey: key,
        });
    },
    render() {
        return (
            <div className="acc-content">
                <LeftTab handlekey={this.handlekey} />
                <div className="content-right">
                    {(() => {
                        switch (this.state.leftKey) {
                            case 'comprehensive':
                                return <Comprehensive />;
                            case 'payment':
                                return <Payment />;
                            case 'correction':
                                return <Correction />;
                            case 'express':
                                return <Express />;
                            case 'applyFee':
                                return <ApplyFee />;
                        };
                    })()}
                </div>
            </div>
        )
    }
});

export default Content;