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

const StepControllerMeta: ComponentMetadata = {
  "componentName": "StepController",
  "title": "StepController",
  "docUrl": "",
  "screenshot": "",
  "devMode": "proCode",
  "npm": {
    "package": "@pisell/private-materials",
    "version": "1.0.4",
    "exportName": "StepController",
    "main": "src/index.ts",
    "destructuring": true,
    "subName": ""
  },
  "configure": {
    props: [
      {
        name: 'steps',
        title: { label: '步骤列表', tip: 'steps | 步骤列表' },
        setter: 'JsonSetter',
        defaultValue: [],
      },
      {
        name: 'currentStep',
        title: { label: '当前步骤', tip: 'currentStep | 当前步骤' },
        setter: 'StringSetter',
      },
      {
        name: 'children',
        title: { label: '内容', tip: 'leftChildren | 内容' },
        setter: 'SlotSetter',
      },
      {
        name: 'confirmCloseProps',
        title: { label: '关闭流程确认弹窗内容', tip: 'confirmCloseProps | 关闭流程确认弹窗内容' },
        setter: 'JsonSetter',
      },
      {
        name: 'showFooter',
        title: { label: '是否显示底部', tip: 'showFooter | 是否显示底部' },
        setter: 'BoolSetter',
      },
      {
        name: 'footerContent',
        title: { label: '底部内容', tip: 'footerContent | 底部内容' },
        setter: 'SlotSetter',
        condition(target) {
          return !!target.getProps().getPropValue("showFooter");
        },
      },
    ],
    "supports": {
      style: true,
      events: [
        {
          name: "onBack",
          template:
            "onBack(key){\n//console.log('返回上一步',key);}",
        },
        {
          name: "onClose",
          template:
            "onClose(){\n//console.log('关闭流程');}",
        },
      ],
    },
    "component": {}
  }
};
const snippets: Snippet[] = [
  {
    "title": "StepController",
    "screenshot": "",
    "schema": {
      "componentName": "StepController",
      "props": {
      }
    }
  }
];

export default {
  ...StepControllerMeta,
  snippets
};
