import containerConnect from 'Framework/ComponentContainer';
import { Services } from 'App/ServiceLocator';
import PdfDownload from '../../Components/PdfDownload';

const mapStateToProps = ({ ui, configurator }) => ({
    Component: PdfDownload,
    show: !!ui.visibilityMap.pdfDownload,
    code: configurator.configuration.code,
});

const mapDispatchToProps = () => ({
    onClose: () => Services.ui.hide('pdfDownload'),
    onOkClick: () => Services.ui.hide('pdfDownload'),
});

export default containerConnect(mapStateToProps, mapDispatchToProps);
