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

const PisellContentMeta: ComponentMetadata = {
  componentName: 'PisellContent',
  title: '内容',
  docUrl: '',
  screenshot: require('./__screenshots__/content.png'),
  devMode: 'proCode',
  category: "布局",
  npm: {
    package: '@pisell/materials',
    version: '1.0.3',
    exportName: 'PisellContent',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  props: [
    {
      title: {
        label: {
          type: 'i18n',
          'en-US': 'className',
          'zh-CN': '类名',
        },
      },
      name: 'className',
      setter: 'StringSetter',
    },
    {
      title: {
        label: {
          type: 'i18n',
          'en-US': 'height',
          'zh-CN': '高度',
        },
      },
      name: 'height',
      setter: 'NumberSetter',
    },
    {
      title: {
        label: {
          type: 'i18n',
          'en-US': 'Other content',
          'zh-CN': '额外内容',
        },
      },
      name: 'children',
      setter: ['SlotSetter'],
    },
    {
      title: {
        label: {
          type: 'i18n',
          'en-US': 'Content scrolling',
          'zh-CN': '内容滚动',
        },
      },
      name: 'scroll',
      setter: 'BoolSetter',
    },
    {
      title: {
        label: {
          type: 'i18n',
          'en-US': 'style',
          'zh-CN': '样式',
        },
      },
      name: 'style',
      setter: 'StyleSetter',
    },
  ],
  configure: {
    component: {
      isContainer: true,
    },
    supports: {
      style: true,
      className: true,
    },
  },
};

const snippets: Snippet[] = [
  {
    title: '内容',
    screenshot: require('./__screenshots__/content.png'),
    schema: {
      componentName: 'PisellContent',
      props: {
        style: {
          backgroundColor: '#7dbcea',
          color: '#fff',
          minHeight: 120,
          lineHeight: '120px',
          textAlign: 'center',
        },
        scroll: true,
      },
    },
  },
];

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