"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _parseData = _interopRequireDefault(require("../utils/parse-data"));
var plainData = 'Option 1\n*Option 2\nOption 3\nOption 4\nOption 5';
var list = (0, _parseData["default"])(plainData).filter(function (_ref) {
  var type = _ref.type;
  return 'node' === type;
});
var dataSource = [];
var value = [];
list.forEach(function (item, index) {
  dataSource.push({
    label: item.value,
    value: index,
    disabled: item.state === 'disabled'
  });
  if (item.state === 'active') {
    value.push(index);
  }
});
var _default = [{
  title: '选择器',
  screenshot: 'https://alifd.oss-cn-hangzhou.aliyuncs.com/fusion-cool/icons/icon-light/ic_light_select.png',
  schema: {
    componentName: 'Select',
    props: {
      mode: 'single',
      hasArrow: true,
      cacheValue: true,
      visible: true,
      plainData: plainData,
      dataSource: dataSource,
      value: value
    }
  }
}];
exports["default"] = _default;