import { ComponentDescription } from '@vtj/engine';
const InputNumber: ComponentDescription = {
  name: 'ElInputNumber',
  title: '数字输入框',
  groupId: 'el',
  categoryId: 'form',
  childIncludes: false,
  package: 'element-plus',
  props: [
    {
      name: 'modelValue',
      defaultValue: '',
      setters: 'NumberSetter'
    },
    {
      name: 'min',
      defaultValue: '',
      setters: 'NumberSetter'
    },
    {
      name: 'max',
      defaultValue: '',
      setters: 'NumberSetter'
    },
    {
      name: 'step',
      defaultValue: 1,
      setters: 'NumberSetter'
    },
    {
      name: 'stepStrictly',
      defaultValue: 1,
      setters: 'NumberSetter'
    },
    {
      name: 'precision',
      defaultValue: '',
      setters: 'NumberSetter'
    },
    {
      name: 'size',
      defaultValue: 'default',
      options: ['large', 'small'],
      setters: 'SelectSetter'
    },
    {
      name: 'readonly',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'disabled',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'controls',
      defaultValue: true,
      setters: 'BooleanSetter'
    },
    {
      name: 'controlsPosition',
      defaultValue: '',
      title: '控制按钮位置',
      label: '按钮位置',
      options: ['right'],
      setters: 'SelectSetter'
    },
    {
      name: 'name',
      defaultValue: '',
      setters: 'InputSetter'
    },
    {
      name: 'label',
      defaultValue: '',
      setters: 'InputSetter'
    },
    {
      name: 'placeholder',
      defaultValue: '',
      setters: 'InputSetter'
    },
    {
      name: 'valueOnClear',
      defaultValue: '',
      options: ['min', 'max'],
      setters: ['InputSetter', 'NumberSetter']
    },
    {
      name: 'validateEvent',
      defaultValue: true,
      options: ['min', 'max'],
      setters: 'BooleanSetter'
    }
  ],
  events: [
    {
      name: 'change'
    },
    {
      name: 'blur'
    },
    {
      name: 'focus'
    }
  ]
};

export default InputNumber;
