import { Story, Meta } from '@storybook/react';

import { Breadcrumbs } from './breadcrumbs';
import type { BreadcrumbsProps } from './types';
import sidebarItemsMap from './__mocks__/mockBreadcrumbs';

export default {
  component: Breadcrumbs,
  title: 'Layout/Header/Breadcrumbs',
  argTypes: {
    pathname: {
      description: 'The path which will be divided to create the breadcrumbs.'
    },
    sidebarItemsMap: {
      description: 'Items to display breadcrumbs according to and know when a crumb is clickable.'
    },
    customBreadcrumbs: {
      description: 'Will override the default breadcrumbs created by pathname.'
    }
  }
} as Meta;

const Template: Story<BreadcrumbsProps> = args => {
  return <Breadcrumbs {...args} />;
};

export const Primary = Template.bind({});
Primary.args = {
  pathname: '/cs/agent-rollout/rollout-logs',
  sidebarItemsMap
};
