import type { Meta, StoryObj } from '@storybook/angular';
import { RegistrationSummaryComponent } from './registration-summary.component';
import { Registration } from '@registratie/domain/registration';

const base = {
  bigNummer: '19012345601',
  naam: 'Dr. A. (Anna) de Vries',
  beroep: 'Arts',
  registratiedatum: '2012-09-01',
  geboortedatum: '1985-03-14',
} satisfies Omit<Registration, 'status'>;

const meta: Meta<RegistrationSummaryComponent> = {
  title: 'Organisms/Registration Summary',
  component: RegistrationSummaryComponent,
};
export default meta;
type Story = StoryObj<RegistrationSummaryComponent>;

// Each story feeds a different union variant; the card renders only the rows
// that variant's data supports (note Doorgehaald has no herregistratie date).
export const Geregistreerd: Story = {
  args: { reg: { ...base, status: { tag: 'Geregistreerd', herregistratieDatum: '2027-09-01' } } },
};
export const Geschorst: Story = {
  args: { reg: { ...base, status: { tag: 'Geschorst', geschorstTot: '2026-12-31', reden: 'Lopend tuchtonderzoek' } } },
};
export const Doorgehaald: Story = {
  args: { reg: { ...base, status: { tag: 'Doorgehaald', doorgehaaldOp: '2024-05-01', reden: 'Op eigen verzoek' } } },
};
