import type { AgTimeInterval } from 'ag-charts-types';
export type ScaleType = 'number' | 'log' | 'time' | 'unit-time' | 'ordinal-time' | 'category' | 'mercator' | 'color';
/**
 * Metadata about a domain's sort characteristics.
 * Used to skip expensive sort order detection in scales.
 */
export interface DomainSortMetadata {
    /** Sort order: 1 = ascending, -1 = descending, undefined = unsorted/unknown */
    sortOrder: 1 | -1 | undefined;
    /** True if all values are unique (no duplicates) */
    isUnique?: boolean;
}
/**
 * A domain array with optional metadata for optimization.
 * When metadata is present, scales can skip expensive scans.
 */
export interface DomainWithMetadata<D> {
    domain: D[];
    sortMetadata?: DomainSortMetadata;
}
/**
 * Extract domain array from a domain with metadata.
 */
export declare function extractDomain<D>(value: DomainWithMetadata<D>): D[];
export interface ScaleTickParams<I> {
    nice: boolean[];
    interval: I | undefined;
    tickCount: number | undefined;
    minTickCount: number;
    maxTickCount: number;
}
export interface NormalizedDomain<D> {
    domain: D[];
    animatable: boolean;
}
export interface ScaleTickResult<D> {
    ticks: D[];
    count: number | undefined;
    firstTickIndex?: number;
    timeInterval?: AgTimeInterval;
}
export declare enum ScaleAlignment {
    Leading = 0,
    Trailing = 1,
    Interpolate = 2
}
export interface Scale<D, R, I = number> {
    readonly type: ScaleType;
    readonly defaultTickCount: number;
    domain: D[];
    range: R[];
    getDomainMinMax(): [D, D] | [undefined, undefined];
    normalizeDomains(...domains: DomainWithMetadata<D>[]): NormalizedDomain<D>;
    toDomain(value: number): D | undefined;
    convert(value: D, options?: {
        clamp?: boolean;
        alignment?: ScaleAlignment;
    }): R;
    invert(value: R, exact?: boolean): D | undefined;
    ticks(ticks: ScaleTickParams<I>, domain?: D[], visibleRange?: [number, number]): ScaleTickResult<D> | undefined;
    niceDomain(ticks: ScaleTickParams<I>, domain?: D[]): D[];
    readonly bandwidth: number | undefined;
    readonly step: number | undefined;
    readonly inset: number | undefined;
}
