import type { Meta, StoryObj } from '@storybook/angular'; import { applicationConfig } from '@storybook/angular'; import { WatMoetIkRegelenSection } from './wat-moet-ik-regelen.section'; import { BigProfileStore } from '@registratie/application/big-profile.store'; import { BigProfile } from '@registratie/domain/big-profile'; import { HerregistratieDecisions } from '@registratie/domain/registration'; import { RemoteData } from '@shared/application/remote-data'; import { loading, success } from '@shared/testing/remote-data'; const profile: BigProfile = { registration: { bigNummer: '19012345601', naam: 'Dr. A. (Anna) de Vries', beroep: 'Arts', registratiedatum: '2012-09-01', geboortedatum: '1985-03-14', status: { tag: 'Geregistreerd', herregistratieDatum: '2027-09-01' }, }, person: { naam: 'Dr. A. (Anna) de Vries', geboortedatum: '1985-03-14', adres: { straat: 'Rijksweg 1', postcode: '2514 EA', woonplaats: 'Den Haag' }, }, }; /** Minimal store stand-in — only the members the section's template and class read. */ function storeStub( profileRd: RemoteData, decisionsRd: RemoteData, pendingHerregistratie: boolean, ) { return { profile: () => profileRd, decisions: () => decisionsRd, pendingHerregistratie: () => pendingHerregistratie, reloadProfile: () => {}, }; } const meta: Meta = { title: 'Domein/Registratie/Wat Moet Ik Regelen', component: WatMoetIkRegelenSection, }; export default meta; type Story = StoryObj; export const Loading: Story = { decorators: [ applicationConfig({ providers: [{ provide: BigProfileStore, useValue: storeStub(loading(), loading(), false) }], }), ], }; export const MetTaken: Story = { decorators: [ applicationConfig({ providers: [ { provide: BigProfileStore, useValue: storeStub( success(profile), success({ eligibleForHerregistratie: true }), false, ), }, ], }), ], parameters: { // Structural: app-choice-link's host sits between the keuzelijst
    and its
  • // — axe's list/listitem rule needs them adjacent regardless of `display:contents`. // Same pre-existing gap as task-list.stories.ts and choice-list.stories.ts. WP-11 // (CIBG markup fidelity) reworks this markup; see // docs/project/backlog/WP-11-markup-fidelity.md. a11y: { disable: true }, }, }; export const NietsOpenstaand: Story = { decorators: [ applicationConfig({ providers: [ { provide: BigProfileStore, useValue: storeStub( success(profile), success({ eligibleForHerregistratie: false }), false, ), }, ], }), ], }; export const InBehandeling: Story = { decorators: [ applicationConfig({ providers: [ { provide: BigProfileStore, useValue: storeStub( success(profile), success({ eligibleForHerregistratie: false }), true, ), }, ], }), ], };