import React from 'react';
import PropTypes from 'prop-types';
import DefaultThemeProvider from '../Configurator/ThemeProvider';
import ItemOverview from './Components/ItemOverview';

export const ItemOverviewScreen = ({ ThemeProvider, renderItemOverview, ...props }) => (
    <ThemeProvider>{renderItemOverview(props)}</ThemeProvider>
);

ItemOverviewScreen.propTypes = {
    ThemeProvider: PropTypes.elementType.isRequired,
    renderItemOverview: PropTypes.func,
};
ItemOverviewScreen.defaultProps = {
    ThemeProvider: DefaultThemeProvider,
    renderItemOverview: props => <ItemOverview {...props} />,
};

export default ItemOverviewScreen;
