import snippets from './snippets';
import { IPublicTypeComponentMetadata } from '@alilc/lowcode-types';

const PisellQuickFilterMeta: IPublicTypeComponentMetadata = {
  componentName: 'PisellQuickFilter',
  title: 'PisellQuickFilter',
  category: '数据录入',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/materials',
    version: '1.0.3',
    exportName: 'PisellQuickFilter',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        name: 'formFiltersPrefix',
        title: '表单字段前缀',
        setter: 'StringSetter',
        defaultValue: 'filters',
      },
      {
        name: 'filterList',
        title: '筛选项列表',
        setter: 'JsonSetter',
      },
      {
        name: 'className',
        title: '样式类名',
        setter: 'StringSetter',
      },
      {
        name: 'style',
        title: '自定义样式',
        setter: 'StyleSetter',
      },
    ],
    supports: {
      style: true,
      className: true,
      events: [
        {
          name: 'onValuesChange',
          template: "onValuesChange(changedValues, allValues, ${extParams}){\n// 表单值改变\nconsole.log('onValuesChange', changedValues);}",
        },
      ],
    },
  },
};

export default {
  ...PisellQuickFilterMeta,
  snippets,
};
