import React from 'react';
import ReactDOM from 'react-dom';
import Tree from '..';
const TreeNode = Tree.Node;
class Demo extends React.Component {
    onSelect(keys, info) {
        console.log('onSelect', keys, info);
    }
    onCheck(keys, info) {
        console.log('onCheck', keys, info);
    }
    onEditFinish(key, label, node) {
        console.log('onEditFinish', key, label, node);
    }
    onRightClick(info) {
        console.log('onRightClick', info);
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(Tree, { checkable: true, editable: true, defaultExpandedKeys: ['2'], defaultCheckedKeys: ['2', '4', '5'], onSelect: this.onSelect, onCheck: this.onCheck, onEditFinish: this.onEditFinish, onRightClick: this.onRightClick, size: 'small' },
                React.createElement(TreeNode, { key: "1", label: "Component" },
                    React.createElement(TreeNode, { key: "2", label: "Form", selectable: false },
                        React.createElement(TreeNode, { key: "4", label: "Input" }),
                        React.createElement(TreeNode, { key: "5", label: "Select", disabled: true })),
                    React.createElement(TreeNode, { key: "3", label: "Display" },
                        React.createElement(TreeNode, { key: "6", label: "Table" })))),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Tree, { defaultExpandedKeys: ['2'], defaultCheckedKeys: ['4'], onSelect: this.onSelect, onCheck: this.onCheck, onEditFinish: this.onEditFinish, onRightClick: this.onRightClick, type: 'document', size: 'small' },
                React.createElement(TreeNode, { key: "1", label: "Component" },
                    React.createElement(TreeNode, { key: "2", label: "Form", selectable: false },
                        React.createElement(TreeNode, { key: "4", label: "Input" }),
                        React.createElement(TreeNode, { key: "5", label: "Select", disabled: true })),
                    React.createElement(TreeNode, { key: "3", label: "Display" },
                        React.createElement(TreeNode, { key: "6", label: "Table" }))))));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('tree-demo-1'));
