import Button from '../../button';
import NumberPicker from '..';
import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            editable: false,
            value: 0,
        };
    }
    toogle() {
        this.setState({
            editable: !this.state.editable,
        });
    }
    onChange(value) {
        console.log('changed', value);
        this.setState({
            value,
        });
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(NumberPicker, { onChange: this.onChange.bind(this), value: this.state.value, editable: this.state.editable }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Button, { onClick: this.toogle.bind(this) },
                "Toggle to ",
                !this.state.editable ? 'editable' : 'uneditable')));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('number-picker-demo-2'));
