import { TimeSpan, bounds, box, scale } from "@synnaxlabs/x";
import { z } from "zod";
import { aether } from '../../../aether/aether';
import { axis } from '../../axis';
import { type TickType } from '../../axis/ticks';
import { type GridSpec } from './grid';
import { render } from '../../render';
export declare const coreAxisStateZ: z.ZodObject<{
    type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["linear", "time"]>>>;
    color: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodType<import("../../../color/external").Color, z.ZodTypeDef, import("../../../color/external").Color>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, "strip", z.ZodTypeAny, {
        rgba255: [number, number, number, number];
    }, {
        rgba255: [number, number, number, number];
    }>]>, import("../../../color/external").Color, string | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    } | import("../../../color/external").Color | [number, number, number]>>;
    font: z.ZodOptional<z.ZodString>;
    label: z.ZodDefault<z.ZodOptional<z.ZodString>>;
    size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
    location: z.ZodEnum<["top", "right", "bottom", "left"]>;
    bounds: z.ZodOptional<z.ZodObject<{
        lower: z.ZodNumber;
        upper: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        lower: number;
        upper: number;
    }, {
        lower: number;
        upper: number;
    }>>;
    tickSpacing: z.ZodDefault<z.ZodNumber>;
    showGrid: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    gridColor: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodType<import("../../../color/external").Color, z.ZodTypeDef, import("../../../color/external").Color>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, "strip", z.ZodTypeAny, {
        rgba255: [number, number, number, number];
    }, {
        rgba255: [number, number, number, number];
    }>]>, import("../../../color/external").Color, string | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    } | import("../../../color/external").Color | [number, number, number]>>;
    autoBounds: z.ZodUnion<[z.ZodObject<{
        lower: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        upper: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    }, "strip", z.ZodTypeAny, {
        lower: boolean;
        upper: boolean;
    }, {
        lower?: boolean | undefined;
        upper?: boolean | undefined;
    }>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>]>;
    autoBoundPadding: z.ZodOptional<z.ZodNumber>;
    autoBoundUpdateInterval: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
        value: z.ZodBigInt;
    }, "strip", z.ZodTypeAny, {
        value: bigint;
    }, {
        value: bigint;
    }>, TimeSpan, {
        value: bigint;
    }>, z.ZodEffects<z.ZodString, TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeSpan, Number>, z.ZodEffects<z.ZodNumber, TimeSpan, number>, z.ZodType<TimeSpan, z.ZodTypeDef, TimeSpan>]>>>;
    labelSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
}, "strip", z.ZodTypeAny, {
    type: "time" | "linear";
    label: string;
    size: number;
    location: "bottom" | "left" | "right" | "top";
    tickSpacing: number;
    showGrid: boolean;
    autoBounds: (boolean | {
        lower: boolean;
        upper: boolean;
    }) & (boolean | {
        lower: boolean;
        upper: boolean;
    } | undefined);
    autoBoundUpdateInterval: TimeSpan;
    labelSize: number;
    color?: import("../../../color/external").Color | undefined;
    font?: string | undefined;
    bounds?: {
        lower: number;
        upper: number;
    } | undefined;
    gridColor?: import("../../../color/external").Color | undefined;
    autoBoundPadding?: number | undefined;
}, {
    location: "bottom" | "left" | "right" | "top";
    type?: "time" | "linear" | undefined;
    color?: string | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    } | import("../../../color/external").Color | [number, number, number] | undefined;
    font?: string | undefined;
    label?: string | undefined;
    size?: number | undefined;
    bounds?: {
        lower: number;
        upper: number;
    } | undefined;
    tickSpacing?: number | undefined;
    showGrid?: boolean | undefined;
    gridColor?: string | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    } | import("../../../color/external").Color | [number, number, number] | undefined;
    autoBounds?: boolean | {
        lower?: boolean | undefined;
        upper?: boolean | undefined;
    } | undefined;
    autoBoundPadding?: number | undefined;
    autoBoundUpdateInterval?: string | number | Number | TimeSpan | {
        value: bigint;
    } | undefined;
    labelSize?: number | undefined;
}>;
export type BaseAxisState = z.output<typeof coreAxisStateZ>;
export declare const withinSizeThreshold: (prev: number, next: number) => boolean;
export declare const EMPTY_LINEAR_BOUNDS: {
    lower: number;
    upper: number;
};
export declare const EMPTY_TIME_BOUNDS: bounds.Bounds;
export declare const emptyBounds: (type: TickType) => bounds.Bounds;
export interface AxisRenderProps {
    grid: GridSpec;
    plot: box.Box;
    viewport: box.Box;
    container: box.Box;
    canvases: render.CanvasVariant[];
    hold: boolean;
}
export declare const autoBounds: (b: bounds.Bounds[], padding: number | undefined, type: TickType) => bounds.Bounds;
interface InternalState {
    render: render.Context;
    core: axis.Axis;
    boundSnapshot?: bounds.Bounds;
    updateBounds?: (bounds: bounds.Bounds) => void;
}
export declare class CoreAxis<S extends typeof coreAxisStateZ, C extends aether.Component = aether.Component> extends aether.Composite<S, InternalState, C> {
    afterUpdate(): Promise<void>;
    afterDelete(): Promise<void>;
    renderAxis(props: AxisRenderProps, decimalToDataScale: scale.Scale): void;
    bounds(hold: boolean, fetchDataBounds: () => Promise<bounds.Bounds[]>): Promise<[bounds.Bounds, Error | null]>;
    dataToDecimalScale(hold: boolean, fetchDataBounds: () => Promise<bounds.Bounds[]>, viewport: box.Box): Promise<[scale.Scale, Error | null]>;
}
export declare const parseAutoBounds: (autoBounds: boolean | {
    lower?: boolean;
    upper?: boolean;
}) => {
    lower: boolean;
    upper: boolean;
};
export {};
