import Breadcrumb from './readme.md'
import BreadcrumbItem from '../breadcrumb-item/readme.md'

export default {
  title: 'Breadcrumb',
  parameters: {
    previewTabs: {
      'storybook/docs/panel': {
        hidden: true,
      },
    },
    notes: { Breadcrumb, BreadcrumbItem }
  },
  argTypes: {
    textItem: {
      name: 'Text',
      table: { category: 'Props (Item)' },
      defaultValue: 'Home',
      control: { type: 'text' }
    },
    currentItem: {
      name: 'Current',
      table: { category: 'Props (Item)' },
      defaultValue: true,
      control: { type: 'boolean' }
    },
    separators: {
      name: 'Separators',
      table: { category: 'Props (Group)' },
      control: { type: 'boolean' }
    },
    negative: {
      name: 'Negative',
      table: { category: 'Props (Group)' },
      control: { type: 'boolean' }
    }
  }
}

export const list = (args) => (`
  <ibk-breadcrumb separators="${args.separators ?? false}" negative="${args.negative ?? false}">
    <ibk-breadcrumb-item
      current="${args.currentItem ?? false}"
      text="${args.textItem}" ></ibk-breadcrumb-item>
    <ibk-breadcrumb-item text="Category"></ibk-breadcrumb-item>
    <ibk-breadcrumb-item text="Product"></ibk-breadcrumb-item>
  </ibk-breadcrumb>
`)