import containerConnect from 'Framework/ComponentContainer';
import { Services } from 'App/ServiceLocator';
import EditDesignButton from '../Components/EditDesignButton';
import { areAllDesignAreasEmpty } from '../../../Reducers/DesignArea/Selectors';

const mapStateToProps = state => {
    return {
        Component: EditDesignButton,
        showCallToAction: areAllDesignAreasEmpty(state.configurator),
    };
};

const mapDispatchToProps = () => {
    return {
        openDesignArea: () => Services.designData.openDesignAreaEditor(),
    };
};

export default containerConnect(mapStateToProps, mapDispatchToProps);
