import NumberPicker from '..';
import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            value: 0,
            tip: '',
        };
        this.onChange = this.onChange.bind(this);
    }
    onChange(value) {
        let num = '';
        if (value >= 0) {
            num = value;
        }
        else {
            num = `negative ${value * -1}`;
        }
        this.setState({
            value,
            tip: `${num}`,
        });
    }
    render() {
        const { value, tip } = this.state;
        return (React.createElement("div", null,
            React.createElement("span", { id: "a11y-number-picker", "aria-live": "assertive", "aria-label": tip }),
            React.createElement(NumberPicker, { type: "inline", value: value, onChange: this.onChange, upBtnProps: { 'aria-label': 'increasing button' }, downBtnProps: { 'aria-label': 'decreasing button' }, "aria-labelledby": "a11y-number-picker" })));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('number-picker-demo-9'));
