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

const PisellFloatingPanelMeta: ComponentMetadata = {
  componentName: 'PisellFloatingPanel',
  title: 'PisellFloatingPanel',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/materials',
    version: '3.0.48',
    exportName: 'PisellFloatingPanel',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'fullHeight',
            'zh-CN': 'fullHeight',
          },
        },
        name: 'fullHeight',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'StringSetter',
                isRequired: false,
                initialValue: '',
              },
            ],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'retractHeight',
            'zh-CN': 'retractHeight',
          },
        },
        name: 'retractHeight',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'StringSetter',
                isRequired: false,
                initialValue: '',
              },
            ],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'width',
            'zh-CN': 'width',
          },
        },
        name: 'width',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'StringSetter',
                isRequired: false,
                initialValue: '',
              },
            ],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'open',
            'zh-CN': 'open',
          },
        },
        name: 'open',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'BoolSetter',
                isRequired: false,
                initialValue: false,
              },
            ],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'onOpenChange',
            'zh-CN': 'onOpenChange',
          },
        },
        name: 'onOpenChange',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'FunctionSetter',
              },
            ],
          },
        },
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'defaultOpen',
            'zh-CN': 'defaultOpen',
          },
        },
        name: 'defaultOpen',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'BoolSetter',
                isRequired: false,
                initialValue: false,
              },
            ],
          },
        },
      },
      {
        name: 'retractSlot',
        title: {
          label: '收起插槽',
        },
        propType: { type: 'oneOfType', value: ['node'] },
        setter: [
          {
            componentName: 'SlotSetter',
            initialValue: {
              type: 'JSSlot',
              value: [],
            },
            defaultValue: null,
          },
        ],
      },
      {
        title: {
          label: {
            type: 'i18n',
            'en-US': 'isFloat',
            'zh-CN': 'isFloat',
          },
        },
        name: 'isFloat',
        setter: {
          componentName: 'MixedSetter',
          props: {
            setters: [
              {
                componentName: 'BoolSetter',
                isRequired: false,
                initialValue: false,
              },
            ],
          },
        },
      },
      {
        name: 'retractIconStyle',
        title: 'retractIconStyle',
        type: 'group',
        extraProps: {
          display: 'entry',
        },
        items: [
          {
            name: 'retractIconStyle',
            title: {
              label: '样式设置',
              tip: 'retractIconStyle | 可用于设置收起按钮图标样式',
            },
            setter: 'StyleSetter',
            extraProps: {
              display: 'block',
            },
          },
        ],
      },
    ],
    supports: {
      style: true,
    },
    component: {
      isContainer: true,
    },
  },
};
const snippets: Snippet[] = [
  {
    title: 'PisellFloatingPanel',
    screenshot: '',
    schema: {
      componentName: 'PisellFloatingPanel',
      props: {},
    },
  },
];

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