import * as React from 'react';
import Accordion from '@mui/material/Accordion';
import AccordionSummary from '@mui/material/AccordionSummary';
import AccordionDetails from '@mui/material/AccordionDetails';
import Typography from '@mui/material/Typography';
import AccordionArrowIcon from '../../Icons/AccordionArrowIcon/index.js';
import { AccordionWrapper, AccordionPanelWrapper } from './style.js';
import theme from '../../../Globals/theme.js';
import { ThemeProvider } from 'styled-components';
import globalStyle from '../../../Globals/global-styles.js';
import Checkbox from '../../Checkbox/Checkbox/index.js';

var AccordionDropdown = function AccordionDropdown(_ref) {
  var heading = _ref.heading,
      _ref$items = _ref.items,
      items = _ref$items === void 0 ? [] : _ref$items;
  return /*#__PURE__*/React.createElement(ThemeProvider, {
    theme: theme
  }, /*#__PURE__*/React.createElement(globalStyle, null), /*#__PURE__*/React.createElement(AccordionWrapper, null, /*#__PURE__*/React.createElement(Accordion, null, /*#__PURE__*/React.createElement(AccordionSummary, {
    expandIcon: /*#__PURE__*/React.createElement(AccordionArrowIcon, null)
  }, /*#__PURE__*/React.createElement(Typography, null, heading)), /*#__PURE__*/React.createElement(AccordionDetails, null, items.map(function (item, idx) {
    return /*#__PURE__*/React.createElement(AccordionPanelWrapper, {
      key: idx
    }, /*#__PURE__*/React.createElement(Checkbox, {
      label: item.label,
      disabled: item.inactive,
      onChange: item.onChange
    }));
  })))));
};

export { AccordionDropdown as default };
//# sourceMappingURL=index.js.map
