import React from "react";
import styled from "styled-components";
import { Flex, H4, Collapsible } from "@netdata/netdata-ui";
export const DefaultListHeader = styled(H4).attrs({ padding: [0], margin: [0] }) `
  cursor: pointer;
`;
const SectionHandle = ({ toggleOpen, label, testid, Header = DefaultListHeader }) => (React.createElement(Header, { "data-testid": testid, onClick: toggleOpen }, label));
const ItemsList = ({ isOpen = false, toggleOpen, label, children, testid, Header }) => (React.createElement(Flex, { column: true },
    React.createElement(SectionHandle, { Header: Header, toggleOpen: toggleOpen, label: label, testid: testid }),
    React.createElement(Collapsible, { open: isOpen }, children)));
export default ItemsList;
//# sourceMappingURL=list.js.map