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

const meta: Meta<ApplicationListComponent> = {
  title: 'Design System/Molecules/Application List',
  component: ApplicationListComponent,
  decorators: [
    applicationConfig({ providers: [provideRouter([])] }),
    moduleMetadata({ imports: [ApplicationLinkComponent] }),
  ],
  render: () => ({
    template: `
      <app-application-list>
        <li app-application-link heading="Herregistratie" subtitle="Verlenging van uw BIG-registratie" status="In behandeling · Referentie 2024-00123 · ingediend op 12 mei 2024" to="/aanvraag/1"></li>
        <li app-application-link heading="Inschrijving" subtitle="Inschrijving in het BIG-register" status="Goedgekeurd · Referentie 2024-00088" to="/aanvraag/2"></li>
        <li app-application-link heading="Inschrijven" subtitle="Schrijf u in in het BIG-register." cta="Start inschrijving" to="/registreren"></li>
      </app-application-list>`,
  }),
};
export default meta;
type Story = StoryObj<ApplicationListComponent>;

export const Default: Story = {};
