import type { Meta, StoryObj } from '@storybook/angular';
import { applicationConfig, moduleMetadata } from '@storybook/angular';
import { provideRouter } from '@angular/router';
import { ChoiceListComponent } from './choice-list.component';
import { ChoiceLinkComponent } from '@shared/ui/choice-link/choice-link.component';

const meta: Meta<ChoiceListComponent> = {
  title: 'Molecules/Choice List',
  component: ChoiceListComponent,
  decorators: [
    applicationConfig({ providers: [provideRouter([])] }),
    moduleMetadata({ imports: [ChoiceLinkComponent] }),
  ],
  render: (args) => ({
    props: args,
    template: `
      <app-choice-list [heading]="heading">
        <app-choice-link heading="Ik heb een Nederlands diploma" instructions="U kunt direct uw registratie aanvragen." to="/registreren" />
        <app-choice-link heading="Ik heb een buitenlands diploma" instructions="Uw diploma moet eerst officieel erkend worden." clickable="true" />
      </app-choice-list>`,
  }),
};
export default meta;
type Story = StoryObj<ChoiceListComponent>;

export const Default: Story = { args: { heading: 'Maak een keuze' } };
