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

const PisellFooterMeta: ComponentMetadata = {
  componentName: 'PisellFooter',
  title: '底部',
  docUrl: '',
  screenshot: require('./__screenshots__/footer.png'),
  devMode: 'proCode',
  category: "布局",
  npm: {
    package: '@pisell/materials',
    version: '1.0.3',
    exportName: 'PisellFooter',
    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': 'style',
          'zh-CN': '样式',
        },
      },
      name: 'style',
      setter: 'StyleSetter',
    },
  ],
  configure: {
    component: {
      isContainer: true,
    },
    supports: {
      style: true,
      className: true,
    },
  },
};

const snippets: Snippet[] = [
  {
    title: '底部',
    screenshot: require('./__screenshots__/footer.png'),
    schema: {
      componentName: 'PisellFooter',
      props: {
        style: {
          backgroundColor: '#1890ff',
          color: '#fff',
          textAlign: 'center',
        },
        height: 80,
      },
      children: [{
        componentName: 'PisellText',
        props: {
          style: {
            color: '#fff',
          },
        },
        children: 'Footer',
      },],
    },
  },
];

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