import React from 'react'; import { useHistory } from 'react-router-dom'; import { Button, NavbarGroup, Classes, NavbarDivider, Intent, } from '@blueprintjs/core'; import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; import { usePaymentMadeDetailContext } from './PaymentMadeDetailProvider'; import withDialogActions from 'containers/Dialog/withDialogActions'; import withAlertsActions from 'containers/Alert/withAlertActions'; import withDrawerActions from 'containers/Drawer/withDrawerActions'; import { Icon, FormattedMessage as T } from 'components'; import { compose } from 'utils'; /** * Payment made - Details panel - actions bar. */ function PaymentMadeDetailActionsBar({ // #withAlertsActions openAlert, // #withDrawerActions closeDrawer, }) { const history = useHistory(); const { paymentMadeId } = usePaymentMadeDetailContext(); // Handle edit payment made. const handleEditPaymentMade = () => { history.push(`/payment-mades/${paymentMadeId}/edit`); closeDrawer('payment-made-detail-drawer'); }; // Handle delete payment made. const handleDeletePaymentMade = () => { openAlert('payment-made-delete', { paymentMadeId }); }; return (