import React from 'react';
import ReactDOM from 'react-dom';
import Transfer from '..';
import { Radio } from '../..';
const dataSource = (() => {
    const dataSource = [];
    for (let i = 0; i < 10; i++) {
        dataSource.push({
            label: `content${i}`,
            value: `${i}`,
            disabled: i % 4 === 0,
        });
    }
    return dataSource;
})();
const themeList = [{
        value: 'white',
        label: 'white',
    }, {
        value: 'grey',
        label: 'grey',
    }];
class Demo extends React.Component {
    constructor(props) {
        super(props);
        this.handleTheme = theme => {
            this.setState({ theme });
        };
        this.state = {
            theme: 'white',
        };
        this.handleChange = this.handleChange.bind(this);
    }
    handleChange(value, data, extra) {
        console.log(value, data, extra);
    }
    render() {
        const { theme } = this.state;
        return (React.createElement("div", null,
            React.createElement("span", { className: "demo-label" }, "Select theme\uFF1A"),
            React.createElement(Radio.Group, { defaultValue: "medium", dataSource: themeList, value: this.state.theme, onChange: this.handleTheme }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement("div", { className: theme },
                React.createElement(Transfer, { showSearch: true, theme: theme, defaultValue: ['3'], dataSource: dataSource, defaultLeftChecked: ['1'], onChange: this.handleChange, titles: ['Searchable', 'Searchable'] }))));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('transfer-demo-3'));
