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 Section = ({className, children, hasBackground, hasMobilePadding}) => {
    const classes = bem.classNames(
        'c-layout__section',
        className,
        {background: hasBackground},
        {'mobile-padding': hasMobilePadding}
    )

    return <section className={classes}>{children}</section>
}

Section.propTypes = {
    children: PropTypes.node,
    className: PropTypes.string,
    hasBackground: PropTypes.bool,
    hasMobilePadding: PropTypes.bool,
}

export default Section
