import React from 'react';
import PropTypes from 'prop-types';
import { createNamespace } from '../../tools/namingTools';
import './styles/ProductPage.scss';

const n = createNamespace('ProductPage');

export const ProductPage = ({
    banner,
    tabMenu,
    content,
    slider
}) => (
    <div {...n('wrapper').props}>
        {banner && <div {...n('banner').props}>{banner}</div>}
        {tabMenu && <div {...n('tabMenu').props}>{tabMenu}</div>}
        {content && <div {...n('content').props}>{content}</div>}
        {slider && <div {...n('slider').props}>{slider}</div>}
    </div>
);

ProductPage.propTypes = {
    banner: PropTypes.element,
    tabMenu: PropTypes.element,
    content: PropTypes.element,
    slider: PropTypes.element
};

ProductPage.defaultProps = {
    banner: null,
    tabMenu: null,
    content: null,
    slider: null
};

export default ProductPage;
