import Radio from '..';
import React from 'react';
import ReactDOM from 'react-dom';
const RadioGroup = Radio.Group;
const list = [
    {
        value: 'apple',
        label: 'Apple',
        disabled: false,
    },
    {
        value: 'pear',
        label: 'Pear',
    },
    {
        value: 'orange',
        label: 'Orange',
        disabled: true,
    },
];
class ControlApp extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            value1: 'apple',
            value2: 'apple',
            value3: '',
        };
        this.onNestChange = this.onNestChange.bind(this);
        this.onSmallChange = this.onSmallChange.bind(this);
        this.onMediumChange = this.onMediumChange.bind(this);
    }
    onSmallChange(value) {
        this.setState({
            value1: value,
        });
    }
    onMediumChange(value) {
        this.setState({
            value2: value,
        });
    }
    onNestChange(value) {
        this.setState({
            value3: value,
        });
    }
    render() {
        return (React.createElement("div", null,
            React.createElement("p", { style: { fontSize: 14 } }, "Small size"),
            React.createElement(RadioGroup, { dataSource: list, shape: "button", size: "small", value: this.state.value1, onChange: this.onSmallChange }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement("p", { style: { fontSize: 14 } }, "Medium size (default)"),
            React.createElement(RadioGroup, { dataSource: list, shape: "button", size: "medium", value: this.state.value2, onChange: this.onMediumChange }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement("p", { style: { fontSize: 14 } }, "Large size"),
            React.createElement(RadioGroup, { shape: "button", size: "large", value: this.state.value3, onChange: this.onNestChange },
                React.createElement(Radio, { id: "banana", value: "banana" }, "Banana"),
                React.createElement(Radio, { id: "watermelon", value: "watermelon" }, "Watermelon"),
                React.createElement(Radio, { id: "peach", value: "peach" }, "Peach")),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement("p", { style: { fontSize: 14 } }, "Disabled and Selected-Disabled status"),
            React.createElement(RadioGroup, { shape: "button", value: "banana", onChange: this.onNestChange },
                React.createElement(Radio, { id: "peach", disabled: true, value: "peach" }, "Peach"),
                React.createElement(Radio, { id: "banana", disabled: true, value: "banana" }, "Banana"))));
    }
}
ReactDOM.render(React.createElement(ControlApp, null), document.getElementById('radio-demo-7'));
