import React from 'react'; import { NavbarGroup, Button, Classes, NavbarDivider, Popover, PopoverInteractionKind, Position, } from '@blueprintjs/core'; import classNames from 'classnames'; import { FormattedMessage as T } from 'components'; import Icon from 'components/Icon'; import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; import NumberFormatDropdown from 'components/NumberFormatDropdown'; import withTrialBalance from './withTrialBalance'; import withTrialBalanceActions from './withTrialBalanceActions'; import { compose, saveInvoke } from 'utils'; import { useTrialBalanceSheetContext } from './TrialBalanceProvider'; function TrialBalanceActionsBar({ // #withTrialBalance trialBalanceDrawerFilter, // #withTrialBalanceActions toggleTrialBalanceFilterDrawer: toggleFilterDrawer, // #ownProps numberFormat, onNumberFormatSubmit, }) { const { refetchSheet, isLoading } = useTrialBalanceSheetContext(); // Handle filter toggle click. const handleFilterToggleClick = () => { toggleFilterDrawer(); }; // Handle re-calc button click. const handleRecalcReport = () => { refetchSheet(); }; // Handle number format submit. const handleNumberFormatSubmit = (values) => { saveInvoke(onNumberFormatSubmit, values); }; return (