import type { Meta, StoryObj } from '@storybook/angular';
import { applicationConfig } from '@storybook/angular';
import { provideRouter } from '@angular/router';
import { TaskListComponent } from './task-list.component';

const meta: Meta<TaskListComponent> = {
  title: 'Molecules/Task List',
  component: TaskListComponent,
  decorators: [applicationConfig({ providers: [provideRouter([])] })],
  render: (args) => ({ props: args, template: `<app-task-list [tasks]="tasks" />` }),
};
export default meta;
type Story = StoryObj<TaskListComponent>;

export const Default: Story = {
  args: {
    tasks: [
      { title: 'Vraag uw herregistratie aan', description: 'Verleng uw registratie vóór 31 december 2026.', to: '/herregistratie', actionLabel: 'Herregistratie aanvragen' },
      { title: 'Controleer uw adresgegevens', description: 'Uw adres is langer dan een jaar niet bevestigd.', to: '/registratie', actionLabel: 'Bekijk uw gegevens' },
    ],
  },
};
