import { BreadcrumbsComponent } from './breadcrumbs.component';
import { UiBreadcrumbsModule } from './breadcrumbs.module';
import { BreadcrumbsItem } from './breadcrumbs-item.model';

export default { title: 'Breadcrumbs', component: BreadcrumbsComponent };

const componentModule = {
  moduleMetadata: {
    declarations: [],
    imports: [UiBreadcrumbsModule],
  },
};

const items: BreadcrumbsItem[] = [
  {
    text: 'Start',
    href: '/',
  },
  {
    text: 'Sub-page 1',
    href: '#',
  },
  {
    text: 'Sub-page 2',
    href: '#',
  },
  {
    text: 'Current page',
    href: 'i-will-not-be-used-because-i-am-the-last-item',
  },
];

export const standard = () => ({
  ...componentModule,
  template: `
    <ui-breadcrumbs [uiItems]="items"></ui-breadcrumbs>
  `,
  props: {
    items,
  },
});
