import { type Metric } from './field';
import { type AdditionalMetric, type MetricOverrides, type MetricQuery } from './metricQuery';
import { TimeFrames } from './timeFrames';
type PreviousPeriod = {
    type: 'previousPeriod';
    granularity: TimeFrames;
    periodOffset?: number;
};
export type PeriodOverPeriodComparison = PreviousPeriod & {
    field: {
        name: string;
        table: string;
    };
};
export declare const validPeriodOverPeriodGranularities: TimeFrames[];
export declare const periodOverPeriodGranularityLabels: Record<TimeFrames, string>;
export declare const isSupportedPeriodOverPeriodGranularity: (granularity: TimeFrames) => boolean;
export declare const hashPopComparisonConfigKeyToSuffix: (configKey: string) => string;
export declare const buildPopAdditionalMetricName: ({ baseMetricName, timeDimensionId, granularity, periodOffset, }: {
    baseMetricName: string;
    timeDimensionId: string;
    granularity: TimeFrames;
    periodOffset: number;
}) => string;
export declare const getPopPeriodLabel: (granularity: TimeFrames, periodOffset: number) => string;
export declare const getPopComparisonConfigKey: ({ timeDimensionId, granularity, periodOffset, }: {
    timeDimensionId: string;
    granularity: TimeFrames;
    periodOffset: number;
}) => string;
export declare const hasPeriodOverPeriodAdditionalMetricWithConfig: ({ additionalMetrics, baseMetricId, timeDimensionId, granularity, periodOffset, }: {
    additionalMetrics: AdditionalMetric[];
    baseMetricId: string;
    timeDimensionId: string;
    granularity: TimeFrames;
    periodOffset: number;
}) => boolean;
export declare const buildPopAdditionalMetric: ({ metric, timeDimensionId, granularity, periodOffset, }: {
    metric: Pick<Metric, "table" | "name" | "label" | "description" | "type" | "sql" | "round" | "compact" | "format" | "formatOptions">;
    timeDimensionId: string;
    granularity: TimeFrames;
    periodOffset: number;
}) => {
    additionalMetric: AdditionalMetric;
    metricId: string;
};
export declare const getGranularityRank: (granularity: TimeFrames) => number;
/**
 * Returns a `MetricOverrides` map where period-over-period metric IDs
 * inherit the format override from their base metric when they don't have
 * one of their own. Leaves any existing PoP overrides untouched.
 *
 * This lets downstream consumers (query services, frontend tables) use a
 * single resolved override map without needing to know about PoP metrics.
 */
export declare const getMetricOverridesWithPopInheritance: (metricQuery: Pick<MetricQuery, "metricOverrides" | "additionalMetrics">) => MetricOverrides;
export {};
//# sourceMappingURL=periodOverPeriodComparison.d.ts.map