import _extends from "@babel/runtime/helpers/extends";
import AccordionSelectorMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/accordion-selector/meta';
import AddressListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/address-list/meta';
import BreadCrumbMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/bread-crumb/meta';
import Button2Meta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/button2/meta';
import CollapseSelectorItemMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/collapse-selector-item/meta';
import CollapseSelectorMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/collapse-selector/meta';
import CollapseMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/collapse/meta';
import CustomDrawerMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-drawer/meta';
import CustomFormMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-form/meta';
import CustomRadioGroupItemMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-radio-group-item/meta';
import CustomRadioGroupMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-radio-group/meta';
import CustomSelectMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/custom-select/meta';
import DCSliderMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/d-c-slider/meta';
import DrawerMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/drawer/meta';
import FormMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/form/meta';
import GoodsCardListCommonMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/goods-card-list-common/meta';
import GoodsCardListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/goods-card-list/meta';
import GridNavMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/grid-nav/meta';
import ImageMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/image/meta';
import InputMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/input/meta';
import IntegralTaskMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/integral-task/meta';
import ItemMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/item/meta';
import MemberCardMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/member-card/meta';
import MenuListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/menu-list/meta';
import MessageListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/message-list/meta';
import NavigationMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/navigation/meta';
import NoticeBarMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/notice-bar/meta';
import PositionMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/position/meta';
import ProfileMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/profile/meta';
import RatingMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/rating/meta';
import ReviewListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/review-list/meta';
import RichTextMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/rich-text/meta';
import SearchBarMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/search-bar/meta';
import SearchHistoryListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/search-history-list/meta';
import ShoppingCartMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/shopping-cart/meta';
import StreamListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/stream-list/meta';
import SwiperMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/swiper/meta';
import SwitchMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/switch/meta';
import TabContainerItemMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/tab-container-item/meta';
import TabContainerMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/tab-container/meta';
import TabMessageMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/tab-message/meta';
import TagCMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/tag-c/meta';
import TeletextListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/teletext-list/meta';
import TextDescriptionDetailListMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/text-description-detail-list/meta';
import Title1Meta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/title1/meta';
import Title2Meta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/title2/meta';
import UserCardMeta from 'E:/projects/source-code/pupu-lowcode/lowcode-react-material/lowcode/user-card/meta';
var componentCategorySort = {};
["基础元素", "布局容器类", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "通用", "引导", "信息输入", "信息展示", "信息反馈"].reverse().forEach(function (item, index) {
  componentCategorySort[item] = ++index;
});
function generateComponentList(components) {
  var componentList = [{
    title: '常用',
    icon: '',
    children: []
  }, {
    title: '容器',
    icon: '',
    children: []
  }, {
    title: '导航',
    icon: '',
    children: []
  }, {
    title: '内容',
    icon: '',
    children: []
  }, {
    title: 'Feedback 反馈',
    icon: '',
    children: []
  }];
  var groupMap = {
    原子组件: true
  };
  var compGroup = {};
  components.forEach(function (comp) {
    var category = comp.category || '其他';
    if (comp.group && !compGroup[comp.componentName]) {
      compGroup[comp.componentName] = comp.group;
    }
    if (comp.group && !groupMap[comp.group]) {
      groupMap[comp.group] = true;
    }
    var target = componentList.find(function (item) {
      return item.title === category;
    });
    if (!target) {
      target = {
        title: category,
        icon: '',
        children: []
      };
      componentList.push(target);
    }
    if (comp.snippets && comp.snippets.length) {
      target.children.push({
        componentName: comp.componentName,
        title: comp.title || comp.componentName,
        sort: {
          category: target.title,
          group: compGroup[comp.componentName] || '原子组件',
          priority: componentCategorySort[target.title] || 0
        },
        icon: '',
        "package": comp.npm.pkg,
        snippets: comp.snippets || []
      });
    }
  });
  return componentList;
}
function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
  if (packageName === void 0) {
    packageName = '@dckj-npm/dc-material';
  }
  if (version === void 0) {
    version = '0.1.381';
  }
  if (basicLibraryVersion === void 0) {
    basicLibraryVersion = {
      "@alifd/next": "1.25.23",
      "@alifd/meet": "2.6.3",
      "antd": "4.17.3"
    };
  }
  if (!meta || !version) {
    return meta;
  }
  var npm = meta.npm;
  if (!npm) {
    return meta;
  }
  if (typeof basicLibraryVersion === 'object' && basicLibraryVersion[npm["package"]]) {
    meta.npm = _extends({}, npm, {
      version: basicLibraryVersion[npm["package"]]
    });
  } else if (npm["package"] === packageName) {
    meta.npm = _extends({}, npm, {
      version: version
    });
  }
  return meta;
}
var componentMetas = [AccordionSelectorMeta, AddressListMeta, BreadCrumbMeta, Button2Meta, CollapseSelectorItemMeta, CollapseSelectorMeta, CollapseMeta, CustomDrawerMeta, CustomFormMeta, CustomRadioGroupItemMeta, CustomRadioGroupMeta, CustomSelectMeta, DCSliderMeta, DrawerMeta, FormMeta, GoodsCardListCommonMeta, GoodsCardListMeta, GridNavMeta, ImageMeta, InputMeta, IntegralTaskMeta, ItemMeta, MemberCardMeta, MenuListMeta, MessageListMeta, NavigationMeta, NoticeBarMeta, PositionMeta, ProfileMeta, RatingMeta, ReviewListMeta, RichTextMeta, SearchBarMeta, SearchHistoryListMeta, ShoppingCartMeta, StreamListMeta, SwiperMeta, SwitchMeta, TabContainerItemMeta, TabContainerMeta, TabMessageMeta, TagCMeta, TeletextListMeta, TextDescriptionDetailListMeta, Title1Meta, Title2Meta, UserCardMeta];
var components = [];
var npmInfo = {};
componentMetas.forEach(function (meta) {
  if (Array.isArray(meta)) {
    components.push.apply(components, meta.map(function (item) {
      if (!item.npm) {
        var componentName = item.componentName;
        var names = componentName.split('.');
        var exportName = names[0],
          subName = names[1];
        item.npm = {
          exportName: exportName,
          main: '',
          destructuring: true,
          subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
        };
      }
      item.npm = _extends({}, npmInfo, item.npm || {});
      return fillRealVersion(item);
    }));
  } else if (meta.components) {
    components.push.apply(components, meta.components.map(function (item) {
      if (!item.npm) {
        var componentName = item.componentName;
        var names = componentName.split('.');
        var exportName = names[0],
          subName = names[1];
        item.npm = {
          exportName: exportName,
          main: '',
          destructuring: true,
          subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
        };
      }
      item.npm = _extends({}, npmInfo, item.npm || {});
      return fillRealVersion(item);
    }));
  } else {
    if (!meta.npm) {
      var componentName = meta.componentName;
      var names = componentName.split('.');
      var exportName = names[0],
        subName = names[1];
      meta.npm = {
        exportName: exportName,
        main: '',
        destructuring: true,
        subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
      };
    }
    meta.npm = _extends({}, npmInfo, meta.npm || {});
    components.push(fillRealVersion(meta));
  }
});
var componentList = generateComponentList(components);
export { components, componentList };
var execCompile = !!true;
if (!execCompile) {
  window.DckjNpmDcMaterialMeta = {
    components: components,
    componentList: componentList
  };
}