import './demo10.css';
import 'whatwg-fetch';
import CascaderSelect from '..';
import Checkbox from '../../checkbox';
import React from 'react';
import ReactDOM from 'react-dom';
class Demo extends React.Component {
    constructor(props) {
        super(props);
        this.handleCheck = () => {
            this.setState({
                checkStrictly: !this.state.checkStrictly,
            });
        };
        this.handleChange = (value, data, extra) => {
            console.log(value, data, extra);
        };
        this.state = {
            data: [],
            value: [],
            checkStrictly: false,
        };
    }
    componentDidMount() {
        fetch('https://os.alipayobjects.com/rmsportal/ODDwqcDFTLAguOvWEolX.json')
            .then(response => response.json())
            .then(data => this.setState({ data, value: ['2975'] }))
            .catch(e => console.log(e));
    }
    render() {
        return (React.createElement("div", { className: "control-multiple-demo" },
            React.createElement("label", { className: "strictly-check" },
                React.createElement(Checkbox, { checked: this.state.checkStrictly, onChange: this.handleCheck }),
                React.createElement("span", { className: "strictly-text" }, "Enable checkStrictly")),
            React.createElement(CascaderSelect, { multiple: true, checkStrictly: this.state.checkStrictly, dataSource: this.state.data, onChange: this.handleChange })));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('cascader-select-demo-10'));
