import React from 'react';
import ReactDOM from 'react-dom';
import Transfer from '..';
import { Radio } from '../..';
const treeDataSource = [
    {
        label: 'Form',
        key: '2',
        value: '2',
        children: [
            {
                label: 'Input',
                key: '4',
                value: '4',
            },
            {
                label: 'Field',
                key: '7',
                value: '7',
            },
            {
                label: 'Select',
                key: '5',
                value: '5',
            },
        ],
    },
    {
        label: 'Display',
        key: '3',
        value: '3',
        children: [
            {
                label: 'Table',
                key: '6',
                value: '6',
            },
        ],
    },
    {
        label: 'Data',
        key: '8',
        value: '8',
        disabled: true,
    },
];
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',
        };
    }
    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, { dataSource: treeDataSource, showTreeSelect: true, theme: theme, titles: ['TreeSeletable', 'TreeSeletable'] }))));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('transfer-demo-7'));
