import React, { Children, cloneElement } from 'react';
import clsx from 'clsx';
import { makeStyles, Divider } from '@material-ui/core';
const useStyles = makeStyles(theme => ({
    root: {},
}));
export const EntityHeaderList = props => {
    const { children, showSeperator = false } = props;
    const arrayChildren = Children.toArray(children);
    const classes = useStyles(props);
    return (React.createElement("div", { className: clsx({
            [classes.root]: true,
        }) }, Children.map(arrayChildren, (child, index) => {
        const isLast = index === arrayChildren.length - 1;
        return (React.createElement(React.Fragment, null, cloneElement(child, {
            isLast,
        }), !isLast && showSeperator && React.createElement(Divider, null)));
    })));
};
//# sourceMappingURL=EntityHeaderList.js.map