import parseData from "../utils/parse-data";
import { createDataSource } from "./adaptor";
var plainData = '*Trunk\n\t-Branch\n\t\t*Branch\n\t\t\tLeaf\n\t\tLeaf\n\t*Branch\n\t\tLeaf\n\t\tLeaf';
var list = parseData(plainData).filter(function (_ref) {
  var type = _ref.type;
  return 'node' === type;
});
var keys = {
  selected: [],
  expanded: []
};
var dataSource = createDataSource(list, keys);
export default [{
  title: '树型选择控件',
  screenshot: 'https://alifd.oss-cn-hangzhou.aliyuncs.com/fusion-cool/icons/icon-light/ic_light_select.png',
  schema: {
    componentName: 'TreeSelect',
    props: {
      mode: 'single',
      hasArrow: true,
      cacheValue: true,
      visible: true,
      plainData: plainData,
      dataSource: dataSource,
      value: keys.selected
    }
  }
}];