// @ts-nocheck import React from 'react'; import { NavbarDivider, NavbarGroup, Classes, Button, Popover, PopoverInteractionKind, Position, } from '@blueprintjs/core'; import classNames from 'classnames'; import { DashboardActionsBar, FormattedMessage as T, Icon } from '@/components'; import { useAPAgingSummaryContext } from './APAgingSummaryProvider'; import NumberFormatDropdown from '@/components/NumberFormatDropdown'; import { APAgingSummaryExportMenu } from './components'; import withAPAgingSummary from './withAPAgingSummary'; import withAPAgingSummaryActions from './withAPAgingSummaryActions'; import { saveInvoke, compose } from '@/utils'; import { DialogsName } from '@/constants/dialogs'; import withDialogActions from '@/containers/Dialog/withDialogActions'; /** * AP Aging summary sheet - Actions bar. */ function APAgingSummaryActionsBar({ // #withPayableAgingSummary isFilterDrawerOpen, // #withARAgingSummaryActions toggleAPAgingSummaryFilterDrawer: toggleFilterDrawerDisplay, // #withDialogActions openDialog, //#ownProps numberFormat, onNumberFormatSubmit, }) { const { isAPAgingFetching, refetch } = useAPAgingSummaryContext(); const handleFilterToggleClick = () => { toggleFilterDrawerDisplay(); }; // handle recalculate report button. const handleRecalculateReport = () => { refetch(); }; // handle number format submit. const handleNumberFormatSubmit = (numberFormat) => { saveInvoke(onNumberFormatSubmit, numberFormat); }; // Handle the print button click. const handlePrintBtnClick = () => { openDialog(DialogsName.APAgingSummaryPdfPreview); }; return (