import React from 'react'; import { NavbarGroup, NavbarDivider, Button, Classes, Popover, PopoverInteractionKind, Position, } from '@blueprintjs/core'; import { FormattedMessage as T } from 'components'; import classNames from 'classnames'; import { Icon } from 'components'; import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; import NumberFormatDropdown from 'components/NumberFormatDropdown'; import { useCashFlowStatementContext } from './CashFlowStatementProvider'; import withCashFlowStatement from './withCashFlowStatement'; import withCashFlowStatementActions from './withCashFlowStatementActions'; import { compose, saveInvoke } from 'utils'; /** * Cash flow statement actions bar. */ function CashFlowStatementActionsBar({ //#withCashFlowStatement isFilterDrawerOpen, //#withCashStatementActions toggleCashFlowStatementFilterDrawer, //#ownProps numberFormat, onNumberFormatSubmit, }) { const { isCashFlowLoading, refetchCashFlow } = useCashFlowStatementContext(); // Handle filter toggle click. const handleFilterToggleClick = () => { toggleCashFlowStatementFilterDrawer(); }; // Handle recalculate report button. const handleRecalculateReport = () => { refetchCashFlow(); }; // handle number format form submit. const handleNumberFormatSubmit = (values) => saveInvoke(onNumberFormatSubmit, values); return (