/**
 * @fileoverview Cost & Budget Analytics -- Option B.
 *
 * Displays cost KPIs with period deltas, a daily cost bar chart with anomaly detection,
 * a cost breakdown treemap, and a detailed cost-by-model table with CSV export.
 */
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import { GlobalFilterState } from '../../../interfaces/analytics-preferences.interface';
import * as i0 from "@angular/core";
interface CostKpi {
    Label: string;
    Value: string;
    Delta: number | null;
    DeltaDirection: 'up' | 'down' | 'stable';
    Highlighted: boolean;
    Icon: string;
}
interface DailyBar {
    Date: string;
    Label: string;
    Cost: number;
    HeightPercent: number;
    IsAnomaly: boolean;
}
interface TreemapCell {
    Label: string;
    Cost: number;
    Percent: number;
    Color: string;
    GridArea: string;
}
interface CostByModelRow {
    Model: string;
    Vendor: string;
    Runs: number;
    InputTokens: number;
    OutputTokens: number;
    CacheReadTokens: number;
    CacheWriteTokens: number;
    CacheHitRate: number;
    CacheSavings: number;
    InputCost: number;
    OutputCost: number;
    TotalCost: number;
    PercentOfTotal: number;
}
export declare class AnalyticsCostBudgetComponent extends BaseAngularComponent implements OnInit, OnDestroy {
    private _timeRange;
    set TimeRange(value: string);
    get TimeRange(): string;
    private _filters;
    set Filters(value: GlobalFilterState);
    get Filters(): GlobalFilterState;
    private shallowFiltersEqual;
    TimeRangeChange: EventEmitter<string>;
    FiltersChange: EventEmitter<GlobalFilterState>;
    private initialized;
    private cdr;
    private destroy$;
    IsLoading: boolean;
    TimeRangeOptionsList: string[];
    CostKpis: CostKpi[];
    DailyBars: DailyBar[];
    AvgLinePercent: number;
    TreemapCells: TreemapCell[];
    CostByModelRows: CostByModelRow[];
    private allRuns;
    private previousPeriodRuns;
    private cacheRates;
    ngOnInit(): void;
    ngOnDestroy(): void;
    OnTimeRangeChange(range: string): void;
    OnFiltersChange(filters: GlobalFilterState): void;
    FormatCurrency(value: number, decimals?: number): string;
    ExportCSV(): void;
    private LoadData;
    /** Stable map key for a model+vendor pair (UUIDs normalized for case-insensitive matching). */
    private rateKey;
    /** The cache rate for a run's model+vendor, or undefined when no active cost row is configured. */
    private rateFor;
    /** Build the per-model+vendor rate lookup, normalizing each per-unit price to currency-per-token. */
    private buildCacheRateMap;
    /** Sum net cache savings across a set of runs using each run's model+vendor rate. */
    private sumCacheSavings;
    private computeKpis;
    /** Append the cache hit-rate and cache-savings KPIs (computed from the current-period runs). */
    private appendCacheKpis;
    private computeDailyBars;
    private computeTreemap;
    private computeCostByModel;
    private sumCostInRange;
    private getDateBounds;
    private buildModelFilter;
    private combineDateAndModelFilter;
    private formatBarLabel;
    private downloadCSV;
    static ɵfac: i0.ɵɵFactoryDeclaration<AnalyticsCostBudgetComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AnalyticsCostBudgetComponent, "app-analytics-cost-budget", never, { "TimeRange": { "alias": "TimeRange"; "required": false; }; "Filters": { "alias": "Filters"; "required": false; }; }, { "TimeRangeChange": "TimeRangeChange"; "FiltersChange": "FiltersChange"; }, never, never, false, never>;
}
export declare function LoadAnalyticsCostBudget(): void;
export {};
//# sourceMappingURL=cost-budget.component.d.ts.map