import { ComponentMeta, ComponentStory } from '@storybook/react';
import { Breadcrumb } from './breadcrumb';

/**
 * Breadcrumb - Storybook Meta
 */
export default {
  title: 'Molecules/Navigation/Breadcrumb',
  component: Breadcrumb,
  argTypes: {
    className: {
      control: {
        type: 'text',
      },
      table: {
        category: 'Styles',
      },
      description: 'Set additional classnames to the nav element.',
      type: {
        name: 'string',
        required: false,
      },
    },
    itemClassName: {
      control: {
        type: 'text',
      },
      table: {
        category: 'Styles',
      },
      description: 'Set additional classnames to the breadcrumb items.',
      type: {
        name: 'string',
        required: false,
      },
    },
    items: {
      description: 'The breadcrumb items.',
      type: {
        name: 'object',
        required: true,
        value: {},
      },
    },
  },
} as ComponentMeta<typeof Breadcrumb>;

const Template: ComponentStory<typeof Breadcrumb> = (args) => (
  <Breadcrumb {...args} />
);

/**
 * Breadcrumb Stories - One item
 */
export const OneItem = Template.bind({});
OneItem.args = {
  items: [{ id: 'home', url: '#', name: 'Home' }],
};

/**
 * Breadcrumb Stories - Two items
 */
export const TwoItems = Template.bind({});
TwoItems.args = {
  items: [
    { id: 'home', url: '#', name: 'Home' },
    { id: 'blog', url: '#', name: 'Blog' },
  ],
};

/**
 * Breadcrumb Stories - Three items
 */
export const ThreeItems = Template.bind({});
ThreeItems.args = {
  items: [
    { id: 'home', url: '#', name: 'Home' },
    { id: 'blog', url: '#', name: 'Blog' },
    { id: 'post1', url: '#', name: 'A Post' },
  ],
};
mmit/public/prism/prism-plsql.js?id=53b63ac27c2275262db9a04be02210a3287aa71d'>commit</a><a href='/www.armandphilippot.com/diff/public/prism/prism-plsql.js?id=53b63ac27c2275262db9a04be02210a3287aa71d'>diff</a><a href='/www.armandphilippot.com/stats/public/prism/prism-plsql.js'>stats</a></td><td class='form'><form class='right' method='get' action='/www.armandphilippot.com/log/public/prism/prism-plsql.js'>
<input type='hidden' name='id' value='53b63ac27c2275262db9a04be02210a3287aa71d'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/www.armandphilippot.com/tree/?id=53b63ac27c2275262db9a04be02210a3287aa71d'>root</a>/<a href='/www.armandphilippot.com/tree/public?id=53b63ac27c2275262db9a04be02210a3287aa71d'>public</a>/<a href='/www.armandphilippot.com/tree/public/prism?id=53b63ac27c2275262db9a04be02210a3287aa71d'>prism</a>/<a href='/www.armandphilippot.com/tree/public/prism/prism-plsql.js?id=53b63ac27c2275262db9a04be02210a3287aa71d'>prism-plsql.js</a></div><div class='content'>blob: 4864f1971e8ca6f3bf31de14e689939b41ef40a1 (<a href='/www.armandphilippot.com/plain/public/prism/prism-plsql.js?id=53b63ac27c2275262db9a04be02210a3287aa71d'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
</pre></td>
<td class='lines'><pre><code>