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

const EventProgressBarMeta: IPublicTypeComponentMetadata = {
  componentName: 'EventProgressBar',
  title: '活动预约顶部进度栏',
  category: '导航',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.4',
    exportName: 'EventProgressBar',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        name: 'showClose',
        title: { label: '显示关闭', tip: 'showClose | 显示关闭' },
        setter: 'BoolSetter',
      },
      {
        name: 'isConfirmClose',
        title: { label: '关闭时二次确认', tip: 'isConfirmClose | 关闭时二次确认' },
        setter: 'BoolSetter',
        condition(target) {
          return target.getProps().getPropValue("showClose");
        },
      },
      {
        name: 'showStep',
        title: { label: '显示步骤数字', tip: 'showStep | 显示步骤数字' },
        setter: 'BoolSetter',
      },
    ],
    supports: {
      style: true,
      events: [
      ],
    },
  },
};

const snippets: IPublicTypeSnippet[] = [
  {
    title: '活动预约顶部进度栏',
    screenshot: '',
    schema: {
      componentName: 'EventProgressBar',
      props: {
        showClose: true,
        isConfirmClose: true,
        showStep: true,
      },
    },
  },
];

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