"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var GoodsCardListMeta = {
  group: '低代码组件',
  componentName: 'GoodsCardList',
  title: '商品卡片列表',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  category: '信息展示',
  npm: {
    "package": '@dckj-npm/dc-material',
    version: '0.1.29',
    exportName: 'GoodsCardList',
    main: 'src/index.tsx',
    destructuring: true,
    subName: ''
  },
  configure: {
    props: [{
      name: '数据源绑定',
      setter: {
        componentName: 'SetterFormVariable',
        props: {
          attributes: [{
            label: '列表数据',
            value: 'dataList',
            children: [{
              label: '唯一标识',
              value: 'key'
            }, {
              label: '封面图片地址列表',
              value: 'imageList'
            }, {
              label: '标题',
              value: 'title'
            }, {
              label: '介绍',
              value: 'desc'
            }, {
              label: '价格',
              value: 'price'
            }, {
              label: '促销价格',
              value: 'activePrice',
              isRequire: false,
              notes: '商品信息的促销价格，只有存在的情况下才会展示该信息'
            }, {
              label: '销量',
              value: 'sales'
            }]
          }]
        }
      }
    }, {
      title: {
        label: {
          type: 'i18n',
          'en-US': 'dataList',
          'zh-CN': '卡片列表数据'
        },
        tip: 'dataList | 卡片列表数据'
      },
      name: 'dataList',
      description: '卡片列表数据',
      setter: {
        componentName: 'ArraySetter',
        props: {
          itemSetter: {
            componentName: 'ObjectSetter',
            props: {
              config: {
                items: [{
                  title: {
                    label: {
                      type: 'i18n',
                      'en-US': 'key',
                      'zh-CN': 'ID'
                    }
                  },
                  name: 'key',
                  setter: {
                    componentName: 'StringSetter',
                    isRequired: true,
                    initialValue: ''
                  }
                }, {
                  title: {
                    label: {
                      type: 'i18n',
                      'en-US': 'imageList',
                      'zh-CN': '封面'
                    }
                  },
                  name: 'imageList',
                  setter: {
                    componentName: 'ArraySetter',
                    props: {
                      itemSetter: {
                        componentName: 'StringSetter',
                        isRequired: false,
                        initialValue: ''
                      }
                    },
                    isRequired: true,
                    initialValue: []
                  }
                }, {
                  title: {
                    label: {
                      type: 'i18n',
                      'en-US': 'title',
                      'zh-CN': '标题'
                    }
                  },
                  name: 'title',
                  setter: {
                    componentName: 'StringSetter',
                    isRequired: true,
                    initialValue: ''
                  }
                }, {
                  title: {
                    label: {
                      type: 'i18n',
                      'en-US': 'desc',
                      'zh-CN': '介绍'
                    }
                  },
                  name: 'desc',
                  setter: {
                    componentName: 'StringSetter',
                    isRequired: true,
                    initialValue: ''
                  }
                }, {
                  title: {
                    label: {
                      type: 'i18n',
                      'en-US': 'price',
                      'zh-CN': '价格'
                    }
                  },
                  name: 'price',
                  setter: {
                    componentName: 'StringSetter',
                    isRequired: true,
                    initialValue: ''
                  }
                }, {
                  title: {
                    label: {
                      type: 'i18n',
                      'en-US': 'sales',
                      'zh-CN': '销量'
                    }
                  },
                  name: 'sales',
                  setter: {
                    componentName: 'NumberSetter',
                    isRequired: true,
                    initialValue: 0
                  }
                }],
                extraSetter: {
                  componentName: 'MixedSetter',
                  isRequired: false,
                  props: {}
                }
              }
            }
          }
        },
        isRequired: true,
        initialValue: [{
          desc: '商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',
          imageList: ['https://loremflickr.com/400/300/food?id=1_0_0'],
          key: '1_0',
          price: '2.57',
          sales: 39261,
          title: '商品标题'
        }, {
          desc: '商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',
          imageList: ['https://loremflickr.com/400/300/food?id=1_1_0'],
          key: '1_1',
          price: '2.57',
          sales: 39261,
          title: '商品标题商品标题商品标题商品标题商品标题商品标题商品标题商品标题'
        }, {
          desc: '商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',
          imageList: ['https://loremflickr.com/400/300/food?id=1_2_0', 'https://loremflickr.com/400/300/food?id=1_2_1', 'https://loremflickr.com/400/300/food?id=1_2_2'],
          key: '1_2',
          price: '2.57',
          sales: 39261,
          title: '商品标题商品标题商品标题商品标题商品标题商品标题商品标题商品标题'
        }, {
          desc: '商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍',
          imageList: ['https://loremflickr.com/400/300/food?id=1_3_0'],
          key: '1_3',
          price: '2.57',
          sales: 39261,
          title: '商品标题'
        }]
      }
    }, {
      title: {
        label: {
          type: 'i18n',
          'en-US': 'maxSales',
          'zh-CN': '最大销量'
        },
        tip: 'maxSales | 最大销量'
      },
      name: 'maxSales',
      description: '最大销量',
      setter: {
        componentName: 'NumberSetter',
        isRequired: false,
        initialValue: 1000
      }
    }, {
      title: {
        label: {
          type: 'i18n',
          'en-US': 'onClick',
          'zh-CN': '点击事件'
        },
        tip: 'onClick | 点击事件'
      },
      name: 'onClick',
      description: '点击事件',
      setter: {
        componentName: 'FunctionSetter'
      }
    }],
    supports: {
      style: true
    },
    component: {
      disableBehaviors: ['copy']
    }
  }
};
var snippets = [{
  title: '商品卡片列表',
  screenshot: '',
  schema: {
    componentName: 'GoodsCardList',
    props: {}
  }
}];
var _default = exports["default"] = (0, _extends2["default"])({}, GoodsCardListMeta, {
  snippets: snippets
});