import {createAccordion} from "./AccordionComponent";
import {AccordionData, EventAccordionData} from "./AccordionData";

export default {
  title: 'Components/Accordion',
  argTypes: {
    title: {
      name: 'Titel',
      control: 'text',
      defaultValue: 'Häufig gestellte Fragen auf einen Blick',
    },
    items: {
      name: 'Items',
      control: {type: 'object'},
      defaultValue: AccordionData,
    }
  }
}

const Template = ({...args}) => {
  return createAccordion({...args});
};

export const Accordion = Template.bind({});
Accordion.args = {};

export const EventAccordion = Template.bind({});
EventAccordion.args = {
  type: 'event',
  title: 'Termine, Veranstaltungsort und Referenten',
  items: EventAccordionData,
};