import snippets from './snippets';

const PisellReservationScheduleMeta = {
  componentName: 'PisellReservationSchedule',
  title: '预约营业日导航',
  category: '数据录入',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: '@pisell/materials',
    version: '1.0.1',
    exportName: 'PisellReservationSchedule',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: { label: '数据', tip: '受控选中日' },
        display: 'block',
        type: 'group',
        items: [
          {
            name: 'value',
            title: { label: '选中日', tip: '可解析日期字符串' },
            propType: 'string',
            setter: ['StringSetter', 'VariableSetter'],
          },
          {
            name: 'defaultValue',
            title: { label: '默认日', tip: '非受控初始日' },
            propType: 'string',
            setter: ['StringSetter', 'VariableSetter'],
          },
          {
            name: 'minDate',
            title: { label: '最早日', tip: '不可早于该日' },
            propType: 'string',
            setter: ['StringSetter', 'VariableSetter'],
          },
          {
            name: 'maxDate',
            title: { label: '最晚日', tip: '不可晚于该日' },
            propType: 'string',
            setter: ['StringSetter', 'VariableSetter'],
          },
        ],
      },
    ],
    supports: {
      style: true,
      events: [
        {
          name: 'onChange',
          template:
            "onChange(date,${extParams}){\n// date 为 dayjs 实例\nconsole.log('onChange', date);}",
        },
      ],
    },
    component: {},
  },
};

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