import { containerConnect } from 'Framework/ComponentContainer';
import AlertDialog from '../Components/AlertDialog';
import { Services } from 'App/ServiceLocator';
import { t } from 'Framework/i18n';

const mapStateToProps = ({ ui: { message } }) => ({
    Component: AlertDialog,
    message: message,
    title: t('errorDialogTitle'),
});

const mapDispatchToProps = () => ({
    dismissMessage: () => Services.ui.dismissAlert(),
});

export default containerConnect(mapStateToProps, mapDispatchToProps);
