// @ts-nocheck import React from 'react'; import { NavbarGroup, Button, Classes, NavbarDivider, Popover, PopoverInteractionKind, Position, } from '@blueprintjs/core'; import { DashboardActionsBar, Icon, FormattedMessage as T } from '@/components'; import classNames from 'classnames'; import NumberFormatDropdown from '@/components/NumberFormatDropdown'; import { InventoryItemDetailsExportMenu } from './components'; import { useInventoryItemDetailsContext } from './InventoryItemDetailsProvider'; import withInventoryItemDetails from './withInventoryItemDetails'; import withInventoryItemDetailsActions from './withInventoryItemDetailsActions'; import { compose, saveInvoke } from '@/utils'; import { DialogsName } from '@/constants/dialogs'; import withDialogActions from '@/containers/Dialog/withDialogActions'; /** * Inventory item details actions bar. */ function InventoryItemDetailsActionsBar({ // #ownProps numberFormat, onNumberFormatSubmit, //#withInventoryItemDetails isFilterDrawerOpen, // #withDialogActions openDialog, //#withInventoryItemDetailsActions toggleInventoryItemDetailsFilterDrawer: toggleFilterDrawer, }) { const { isInventoryItemDetailsLoading, inventoryItemDetailsRefetch } = useInventoryItemDetailsContext(); // Handle filter toggle click. const handleFilterToggleClick = () => { toggleFilterDrawer(); }; //Handle recalculate the report button. const handleRecalcReport = () => { inventoryItemDetailsRefetch(); }; // Handle number format form submit. const handleNumberFormatSubmit = (values) => { saveInvoke(onNumberFormatSubmit, values); }; // Handle print button click. const handlePrintBtnClick = () => { openDialog(DialogsName.InventoryItemDetailsPdfPreview); }; return (