import React from 'react'
import PropTypes from 'prop-types'

import BEMModule from 'utils/bem'
import styles from './styles.scss'
const bem = new BEMModule(styles)

const Banner = ({
    children,
    className,
    neutral,
    error,
    info,
    rounded,
    style,
    warning,
    accent,
}) => {
    const rootClassNames = bem.classNames(
        'c-banner',
        {
            accent,
            neutral,
            error,
            info,
            rounded,
            warning,
        },
        className
    )

    return (
        <div className={rootClassNames} style={style}>
            {children}
        </div>
    )
}

Banner.propTypes = {
    accent: PropTypes.bool,
    children: PropTypes.node,
    className: PropTypes.string,
    error: PropTypes.bool,
    info: PropTypes.bool,
    neutral: PropTypes.bool,
    rounded: PropTypes.bool,
    style: PropTypes.object,
    warning: PropTypes.bool,
}

export default Banner
