export default {
  type: 'group',
  display: 'plain',
  title: '标签设置',
  condition: (target: any) => target.getProps().getPropValue('isShowTag'),
  items: [
    {
      title: '',
      name: 'tags',
      setter: {
        componentName: 'ArraySetter',
        props: {
          itemSetter: {
            componentName: 'ObjectSetter',
            props: {
              config: {
                items: [
                  {
                    title: '内容',
                    name: 'children',
                    setter: 'PisellI18nSetter',
                    important: true,
                  },
                  {
                    title: '颜色',
                    name: 'color',
                    setter: 'ColorSetter',
                    important: true,
                  },
                ],
                column: 2,
              },
            },
            initialValue: {
              color: 'gold',
            },
          },
        },
      },
    },
    {
      title: '展示位置',
      name: 'tag.placement',
      setter: {
        componentName: 'RadioGroupSetter',
        props: {
          options: [
            {
              label: '单独行',
              value: 'separate',
            },
            {
              label: '姓名行',
              value: 'inline',
            },
          ],
        },
        initialValue: 'inline',
      },
    },
    {
      title: '展示状态',
      name: 'tag.flexWrap',
      setter: {
        componentName: 'RadioGroupSetter',
        props: {
          options: [
            {
              label: '一行展示',
              value: 'nowrap',
            },
            {
              label: '多行展示',
              value: 'wrap',
            },
          ],
        },
        initialValue: 'nowrap',
      },
    },
    {
      title: '间距',
      name: 'tag.gap',
      setter: ['NumberSetter', 'StringSetter'],
      defaultValue: 4,
    },
  ],
};
