import React, {Component, PropTypes} from 'react';

import {
    Row,
    Col,
    Form,
    Input,
    Button,
    Checkbox,
    Select,
    message,
    Tabs,
    Cascader,
    Radio,
    Upload,
    Icon,
    Modal,
    DatePicker,
    Table
} from 'antd';

export default class NextPrve extends Component {
    constructor(props, context) {
        super(props, context);
    }

    render(){
        function handleStep (s){
            this.props.handleStep(s);
        }
        return (
            <div style={{textAlign:'center', borderTop:'1px solid #eee', height:60, paddingTop:20 }}>
                {
                    this.state.step > 1 &&
                    <Button loading={this.props.loading}
                            style={{margin:'0 1em'}}
                            onClick={handleStep.bind(this, -1)}><Icon type="save"/>上一步</Button>
                }

                {
                    this.state.step < tabs.length &&
                    <Button type="primary" loading={this.props.loading}
                            style={{margin:'0 1em'}}
                            onClick={handleStep.bind(this, 1)}><Icon type="save"/>下一步</Button>
                }

                {
                    this.state.step == tabs.length &&
                    <Button type="primary" loading={this.props.loading}
                    ><Icon type="solution"/>发布</Button>
                }
            </div>
        );
    }
}
