import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';

const EventResourceUsabilityMeta: IPublicTypeComponentMetadata = {
  componentName: 'EventTimeResourceSelector',
  title: '时间资源选择器',
  category: '数据展示',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.4',
    exportName: 'EventTimeResourceSelector',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: "字段展示",
        display: "block",
        type: "group",
        items: [
          {
            name: 'showUnavailable',
            title: { label: '显示不可用时间/时间段', tip: 'showUnavailable | 显示不可用时间/时间段' },
            setter: 'BoolSetter',
          },
          {
            name: 'defaultExpanded',
            title: { label: '默认展开', tip: 'defaultExpanded | 默认展开' },
            setter: 'BoolSetter',
          },
          {
            name: 'defaultSelectFirst',
            title: { label: '默认选中第一个可用选项', tip: 'defaultSelectFirst | 默认选中第一个可用选项' },
            setter: 'BoolSetter',
          },
        ]
      },
    ],
    supports: {
      style: true,
      events: [
      ],
    },
  },
};

const snippets: IPublicTypeSnippet[] = [
  {
    title: '时间资源选择器',
    screenshot: '',
    schema: {
      componentName: 'EventTimeResourceSelector',
      props: {
        showUnavailable: true,
        defaultExpanded: true,
        defaultSelectFirst: true
      },
    },
  },
];

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