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: 'Design System/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">
        <div app-data-row key="Straat en huisnummer" value="Dorpsstraat 1"></div>
        <div app-data-row key="Postcode" value="1234 AB"></div>
        <div app-data-row key="Woonplaats" value="Utrecht"></div>
      </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 },
};
