import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';

const PayMeta: ComponentMetadata = {
  componentName: 'EftposPay',
  title: 'EftposPay',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/private-materials',
    version: '1.0.1',
    exportName: 'EftposPay',
    main: 'src/index.ts',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'type',
            'zh-CN': 'type',
          },
        },
        name: 'type',
        setter: ['JsonSetter', 'VariableSetter'],
      },
      // {
      //   title: {
      //     label: {
      //       type: 'i18n',
      //       'en-US': 'key',
      //       'zh-CN': 'key',
      //     },
      //   },
      //   name: 'key',
      //   setter: ['JsonSetter', 'VariableSetter'],
      // },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'tyroUrl',
            'zh-CN': 'tyroUrl',
          },
        },
        name: 'tyroUrl',
        setter: ['JsonSetter', 'VariableSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'tyroVersion',
            'zh-CN': 'tyroVersion',
          },
        },
        name: 'tyroVersion',
        setter: ['JsonSetter', 'VariableSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'source',
            'zh-CN': 'source',
          },
        },
        name: 'source',
        setter: ['JsonSetter', 'VariableSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'mode',
            'zh-CN': 'mode',
          },
        },
        name: 'mode',
        setter: ['JsonSetter', 'VariableSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'terminal',
            'zh-CN': 'terminal',
          },
        },
        name: 'terminal',
        setter: ['JsonSetter', 'VariableSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'onChangeStatus',
            'zh-CN': 'onChangeStatus',
          },
        },
        name: 'onChangeStatus',
        setter: ['FunctionSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'onChangeParams',
            'zh-CN': 'onChangeParams',
          },
        },
        name: 'onChangeParams',
        setter: ['FunctionSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'getApi',
            'zh-CN': 'getApi',
          },
        },
        name: 'getApi',
        setter: ['FunctionSetter'],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'params',
            'zh-CN': 'params',
          },
        },
        name: 'params',
        setter: ['JsonSetter', 'VariableSetter'],
      },
    ],
    supports: {
      style: true,
      events: [
        {
          name: 'onLogin',
        },
      ],
    },
    component: {},
  },
};
const snippets: Snippet[] = [
  {
    title: 'EftposPay',
    screenshot: '',
    schema: {
      componentName: 'EftposPay',
      props: {},
    },
  },
];

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