import { PanelBarItem } from "@progress/kendo-react-layout";
import withToolTip from "../../../../hoc/withToolTip";
import { ComprehensiveProps } from "../../../DomainProps";

export interface AccordianItemProps extends ComprehensiveProps {
  children: JSX.Element[];
  selected?: boolean;
  title: string;
  expanded?: boolean;
  onToggle?: any;
}

function AccordianItem({
  id,
  widgetStyle,
  children,
  selected,
  title,
  disabled,
  expanded,
  onToggle,
}: AccordianItemProps) {
  return (
    <PanelBarItem
      id={widgetStyle?.id}
      className={widgetStyle?.className || ""}
      expanded={expanded}
      selected={selected}
      title={title}
      disabled={disabled}
      onSelect={() => {
        onToggle(!expanded);
      }}
    >
      {children &&
        children.map((panelItem) => {
          return "7777";
        })}
    </PanelBarItem>
  );
}

export default withToolTip(AccordianItem);
