import readme from './readme.md'

export default {
  title: 'Number picker',
  parameters: {
    previewTabs: {
      'storybook/docs/panel': {
        hidden: true,
      },
    },
    notes: { readme },
  },
  argTypes: {
    min: {
      name: 'Min',
      table: { category: 'Props' },
      control: { type: 'number' }
    },
    max: {
      name: 'Max',
      table: { category: 'Props' },
      control: { type: 'number' }
    },
    current: {
      name: 'Current',
      table: { category: 'Props' },
      control: { type: 'number' }
    },
    size: {
      name: 'Size',
      table: { category: 'Props' },
      defaultValue: 'medium',
      control: { type: 'select', options: ['medium', 'large', 'full'] }
    },
    editable: {
      name: 'Editable',
      table: { category: 'Props' },
      control: { type: 'boolean' }
    },
  }
}

export const numberPicker = (args) => (`
  <ibk-number-picker min="${args.min}"
    max="${args.max}"
    current=${args.current ?? 10}
    size="${args.size}"
    editable="${args.editable ?? false}" >
  </ibk-number-picker>
`)