import React from 'react';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
    root: {
        display: 'flex'
    },
    rootFlexGrow: {
        flexGrow: 1
    },
    rootFlexAlignStart: {
        alignItems: 'flex-start'
    },
    rootFlexAlignCenter: {
        alignItems: 'center'
    },
    rootFlexAlignEnd: {
        alignItems: 'flex-end'
    },
    rootFlexAlignStretch: {
        alignItems: 'stretch'
    },
    rootGutter: {
        paddingLeft: theme.spacing(2),
        paddingRight: theme.spacing(2)
    },
    rootPadding: {
        paddingTop: theme.spacing(1),
        paddingBottom: theme.spacing(1)
    },
    rootFlexJustifyStart: {
        justifyContent: 'flex-start'
    },
    rootFlexJustifyEnd: {
        justifyContent: 'flex-end'
    }
}));
export const EntityHeaderSection = (props) => {
    const { children, disableGutter, disablePadding, flexGrow, justifyContent, alignItems } = props;
    const classes = useStyles(props);
    return (React.createElement("div", { className: clsx({
            [classes.root]: true, //always applies
            [classes.rootGutter]: !disableGutter,
            [classes.rootPadding]: !disablePadding,
            [classes.rootFlexGrow]: flexGrow,
            [classes.rootFlexJustifyStart]: justifyContent === 'start',
            [classes.rootFlexJustifyEnd]: justifyContent === 'end',
            [classes.rootFlexAlignStart]: alignItems === 'start',
            [classes.rootFlexAlignCenter]: alignItems === 'center',
            [classes.rootFlexAlignEnd]: alignItems === 'end',
            [classes.rootFlexAlignStretch]: alignItems === 'stretch'
        }) }, children));
};
EntityHeaderSection.propTypes = {
    children: PropTypes.node.isRequired,
    disableGutter: PropTypes.bool,
    disablePadding: PropTypes.bool,
    flexGrow: PropTypes.bool,
    justifyContent: PropTypes.oneOf(['start', 'end']),
    alignItems: PropTypes.oneOf(['start', 'center', 'end', 'stretch'])
};
EntityHeaderSection.defaultProps = {
    disableGutter: false,
    disablePadding: false,
    flexGrow: false
};
//# sourceMappingURL=EntityHeaderSection.js.map