import { ActionDrawerState, DataSeries, GlobalCopy, Transaction } from '../../../core'; import { DataSet } from '../../../core/types/InsightsInstanceSlotData'; import { TransactionFilter } from '../../../core/stores/TransactionStore'; import { buildChartData, ChartDataSeriesItem } from '../../blocks/ChartBlocks/BarchartBlock/utils'; import { DrillDownVariantConfig } from './layout'; interface DefaultSelectionProp { chartTabCount: number; comparisonTabCount: number; actionDrawer: ActionDrawerState; beatGuid: string; } export declare const getDrillDownConfig: (variant?: string) => DrillDownVariantConfig; export interface FlattenedDataSeries { dataSeries: ChartDataSeriesItem[]; chartData: ReturnType; comparisonBars: DataSet[]; } /** * Shapes the beat's raw data_series into the chart inputs for the variant's top kind. This MR handles * the single-bar family (singleBar / upcomingBill); the double-bar and tabsOnly branches are stubbed * for the next MR so the call site is already wired. */ interface FlattenedDataSeriesInput { data: DataSeries | undefined; ariaLabel: string; top: DrillDownVariantConfig['top']; beatTransactions: Transaction[]; payload: { date?: string; amount?: number; } | undefined; } export declare const getFlattenedDataSeries: ({ data, ariaLabel, top, beatTransactions, payload, }: FlattenedDataSeriesInput) => FlattenedDataSeries; export declare const PROJECTED_BILL_GUID = "TRN-projected-bill"; export interface UpcomingBillBar { date: string; amount: number; guid: string; category_guid?: string; } /** * UpcomingBill has no data_series: build the bar series straight from the beat's recurring-bill * transactions plus the synthesized projected bill from payload (mirrors pulse's magicTransactions). * Historical bills are de-duped by date and each keeps its real transaction guid so the guid filter * finds it in the store; the projected bar (cloned category from the latest bill) carries the * PROJECTED_BILL_GUID sentinel. The result is sorted date-ascending so the projected bill lands last. */ export declare const buildUpcomingBillSeries: (transactions: Transaction[] | undefined, payload: { date?: string; amount?: number; } | undefined) => UpcomingBillBar[]; export declare const getDrawerHeaderTitle: (variant: string | null | undefined, copy: GlobalCopy) => string; export declare const toStoreFilter: (filter: TransactionFilter, defaults: { allAccountGuids: string[]; displayedDateRange: { start: Date; end: Date; }; }) => TransactionFilter; export declare const getDefaultSelection: ({ chartTabCount, actionDrawer, beatGuid, }: DefaultSelectionProp) => { chartBarIndex: number; subTabIndex: number; }; export {};