import { ReactNode } from 'react';
import { FC } from 'react';

import { AccordionProps } from '@material-hu/components/design-system/Accordion';

import VacationsFilterAccordion from './GeneralFilterAccordion';

export type AdvanceReportFiltersAccordionProps = {
  title: string;
  children: ReactNode;
  accordionProps?: Partial<AccordionProps>;
};

const AdvanceReportFiltersAccordion: FC<
  AdvanceReportFiltersAccordionProps
> = props => {
  const { title, children, accordionProps } = props;

  return (
    <VacationsFilterAccordion
      label={title}
      accordionProps={accordionProps}
    >
      {children}
    </VacationsFilterAccordion>
  );
};

export default AdvanceReportFiltersAccordion;
