import React from 'react';
import { Meta, Story } from '@storybook/react';
import {IAccordionProps, MoleculeAccordion} from 'react/molecules/Accordion';

const meta: Meta = {
  title: 'React/molecules/Accordion',
  component: MoleculeAccordion,
  argTypes: {},
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateAccordion: Story<IAccordionProps> = (props) => <MoleculeAccordion {...props} />;

// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
// https://storybook.js.org/docs/react/workflows/unit-testing
export const Accordion = TemplateAccordion.bind({});

Accordion.args = {
  data: [
    {
      header: 'Header 1',
      detail: 'Detail 1',
      _id: 1
    },
    {
      header: 'Header 2',
      detail: 'Detail 2',
      _id: 2
    }
  ],
};
