import React from 'react'; import { NavbarGroup, Button, Classes, NavbarDivider, Popover, PopoverInteractionKind, Position, } from '@blueprintjs/core'; import classNames from 'classnames'; import { FormattedMessage as T } from 'react-intl'; import { Icon } from 'components'; import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; import NumberFormatDropdown from 'components/NumberFormatDropdown'; import withInventoryValuation from './withInventoryValuation'; import withInventoryValuationActions from './withInventoryValuationActions'; import { useInventoryValuationContext } from './InventoryValuationProvider'; import { compose, saveInvoke } from 'utils'; function InventoryValuationActionsBar({ // #withInventoryValuation isFilterDrawerOpen, // #withInventoryValuationActions toggleInventoryValuationFilterDrawer, // #ownProps numberFormat, onNumberFormatSubmit, }) { const { refetchSheet, isLoading } = useInventoryValuationContext(); // Handle filter toggle click. const handleFilterToggleClick = () => { toggleInventoryValuationFilterDrawer(); }; // Handle re-calc button click. const handleRecalculateReport = () => { refetchSheet(); }; // Handle number format submit. const handleNumberFormatSubmit = (numberFormat) => { saveInvoke(onNumberFormatSubmit, numberFormat); }; return (