import React from 'react';
import { Cascader, Row, Col } from '@btri-ui/base';

const options = [
  {
    value: 'zhejiang',
    label: 'Zhejiang',
    children: [
      {
        value: 'hangzhou',
        label: 'Hangzhou',
        children: [
          {
            value: '1',
            label: 'West Lake',
            disabled: true,
          },
          {
            value: '2',
            label: 'East Lake',
          },
          {
            value: '3',
            label: 'North Lake',
            disabled: true,
          },
          {
            value: '4',
            label: 'South Lake',
          },
        ],
      },
    ],
  },
  {
    value: 'jiangsu',
    label: 'Jiangsu',
    children: [
      {
        value: 'nanjing',
        label: 'Nanjing',
        children: [
          {
            value: 'zhonghuamen',
            label: 'Zhong Hua Men',
            disabled: true,
          },
        ],
      },
    ],
  },
];

const onChange = value => {
  console.log(value);
};

export default () => (
  <Row autoMode={true}>
    <Col span={4}>
      <Cascader options={options} onChange={onChange} multiple />
    </Col>
  </Row>
);
