import type { Meta, StoryObj } from '@storybook/angular';
import { moduleMetadata } from '@storybook/angular';
import { ReviewSectionComponent } from './review-section.component';
import { DataRowComponent } from '@shared/ui/data-row/data-row.component';

const meta: Meta<ReviewSectionComponent> = {
  title: 'Molecules/Review Section',
  component: ReviewSectionComponent,
  decorators: [moduleMetadata({ imports: [DataRowComponent] })],
  render: (args) => ({
    props: args,
    template: `
      <app-review-section [heading]="heading" [editLabel]="editLabel" [editAriaLabel]="editAriaLabel" [showEdit]="showEdit">
        <app-data-row key="Straat en huisnummer" value="Dorpsstraat 1" />
        <app-data-row key="Postcode" value="1234 AB" />
        <app-data-row key="Woonplaats" value="Utrecht" />
      </app-review-section>`,
  }),
};
export default meta;
type Story = StoryObj<ReviewSectionComponent>;

export const Default: Story = {
  args: { heading: 'Adres en correspondentie', editAriaLabel: 'Wijzigen adresgegevens' },
};
export const ZonderWijzigen: Story = {
  args: { heading: 'Adres en correspondentie', showEdit: false },
};
