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


const PisellNumberKeyboardMeta: ComponentMetadata = {
  componentName: "PisellNumberKeyboard",
  title: "PisellNumberKeyboard",
  docUrl: "",
  screenshot: "",
  devMode: "proCode",
  npm: {
    package: "@pisell/materials",
    version: "1.0.3",
    exportName: "PisellNumberKeyboard",
    main: "src/index.tsx",
    destructuring: true,
    subName: "",
  },
  props: [
    {
      name: "defaultValue",
      title: { label: "默认值", tip: "默认值" },
      propType: "number",
      setter: "NumberSetter",
    },
    {
      name: "max",
      title: { label: "最大值", tip: "最大值" },
      propType: "number",
      setter: "NumberSetter",
    },
    {
      name: "min",
      title: { label: "最小值", tip: "最小值" },
      propType: "number",
      setter: "NumberSetter",
    },
    {
      name: "doneText",
      title: { label: "确认按钮文案", tip: "确认按钮文案" },
      propType: "string",
      defaultValue: "Done",
      setter: "PisellI18nSetter",
    },
    {
      name: "resetText",
      title: { label: "重置按钮文案", tip: "重置按钮文案" },
      propType: "string",
      defaultValue: "Reset",
      setter: "PisellI18nSetter",
    },
    {
      name: "placeholder",
      title: { label: "展位文字placeholder", tip: "placeholder" },
      propType: "string",
      setter: "PisellI18nSetter",
    },
  ],
  configure: {
    supports: {
      style: true,
      events: [
        {
          name: "onClick",
          template:
            "onClick(event,${extParams}){\n// 点击时的回调\nconsole.log('onClick', event);}",
        },
        {
          name: "onChange",
          template:
            "onChange(value,${extParams}){\nconsole.log('onChange', value);}",
        },
        {
          name: "onEnter",
          template:
            "onEnter(value,${extParams}){\nconsole.log('onEnter', value);}",
        },
      ],
    },
    component: {
      isContainer: true,
    },
  },
};
const snippets: Snippet[] = [
  {
    title: "PisellNumberKeyboard",
    screenshot: "",
    schema: {
      componentName: "PisellNumberKeyboard",
      props: {},
    },
  },
];

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