import React from "react";
import Accordion from "./Accordion";
import AccordionItem from "./AccordionItem.skeleton";
import AccordionItemWithContext from "./AccordionItemWithContext.skeleton";
export default function DefaultAccordion(_ref) {
  let {
    items
  } = _ref;
  return /*#__PURE__*/React.createElement(Accordion, {
    position: "bottom",
    opened: [true]
  }, items.map((item, index) => {
    return /*#__PURE__*/React.createElement(AccordionItemWithContext, {
      index: index,
      heading: item.heading,
      key: "index" + index
    }, item.children);
  }));
} // export  function Tree({ items }) {
//     let state = { aid : {
//         state : open ,
//         child : [ aid : { } ]
//     } }
//     return (
//       <Accordion position="bottom" opened={[true]}>
//         {items.map((item, index) => {
//           return (
//             <AccordionItemWithContext
//               index={index}
//               heading={item.heading}
//               key={"index" + index}
//             >
//               {item.children ==' array' ? <TreeItem/> : item.children }
//             </c>
//           );
//         })}
//       </Accordion>
//     );
//   }
// <Accordion>
//     <AccordionItemWithContext heading={{}}>
//         <div>adsasdasd</div>
//     </AccordionItemWithContext>
//     <AccordionItemWithContext heading={{}}>
//         <div>adsasdasd</div>
//     </AccordionItemWithContext>
//     <AccordionItemWithContext heading={{}}>
//         <div>adsasdasd</div>
//     </AccordionItemWithContext>
//     <AccordionItemWithContext heading={{}}>
//         <div>adsasdasd</div>
//     </AccordionItemWithContext>
// </Accordion>
// <Tree items={[{heading:'',children:[{heading:'',children:[{}]}]}]}>