import readme from './readme.md'

export default {
  title: 'Notification',
  parameters: {
    previewTabs: {
      'storybook/docs/panel': {
        hidden: true,
      },
    },
    notes: { readme },
  },
  argTypes: {
    message: {
      name: 'Message',
      table: { category: 'Props' },
      control: { type: 'text' }
    },
    type: {
      name: 'Type',
      table: { category: 'Props' },
      defaultValue: 'success',
      control: { type: 'select', options: ['success', 'alert', 'error', 'info'] }
    },
    width: {
      name: 'Width',
      table: { category: 'Props' },
      control: { type: 'text' }
    },
    container: {
      name: 'Container',
      table: { category: 'Props' },
      defaultValue: 'on',
      control: { type: 'select', options: ['on', 'off'] }
    },
  }
}

export const notification = (args) => (`
  <ibk-notification type="${args.type}"
    message="${args.message ?? 'Default notification'}"
    width="${args.width}"
    container="${args.container}" >
  </ibk-notification>
`)