import { bounds, box, scale, TimeSpan, TimeStamp } from '@synnaxlabs/x';
import { z } from 'zod';
import { aether } from '../../aether/aether';
import { axis } from '../../vis/axis';
import { TickType } from '../../vis/axis/ticks';
import { grid } from '../../vis/grid';
import { render } from '../../vis/render';
export declare const coreAxisStateZ: z.ZodObject<{
    tickSpacing: z.ZodDefault<z.ZodNumber>;
    color: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, z.core.$strip>]>, z.ZodTransform<[number, number, number, number], string | [number, number, number] | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    }>>>;
    type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
        time: "time";
        linear: "linear";
    }>>>;
    font: z.ZodOptional<z.ZodString>;
    showGrid: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    location: z.ZodEnum<{
        top: "top";
        right: "right";
        bottom: "bottom";
        left: "left";
    }>;
    gridColor: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, z.core.$strip>]>, z.ZodTransform<[number, number, number, number], string | [number, number, number] | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    }>>>;
    axisKey: z.ZodOptional<z.ZodString>;
    bounds: z.ZodOptional<z.ZodObject<{
        lower: z.ZodNumber;
        upper: z.ZodNumber;
    }, z.core.$strip>>;
    autoBounds: z.ZodUnion<[z.ZodObject<{
        lower: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        upper: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    }, z.core.$strip>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>]>;
    autoBoundPadding: z.ZodOptional<z.ZodNumber>;
    autoBoundUpdateInterval: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
        value: z.ZodBigInt;
    }, z.core.$strip>, z.ZodTransform<TimeSpan, {
        value: bigint;
    }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<TimeStamp, TimeStamp>, z.ZodTransform<TimeSpan, TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>>>;
    size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
    label: z.ZodDefault<z.ZodOptional<z.ZodString>>;
    labelSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
}, z.core.$strip>;
export type BaseAxisState = z.infer<typeof coreAxisStateZ>;
export declare const withinSizeThreshold: (prev: number, next: number) => boolean;
export declare const EMPTY_LINEAR_BOUNDS: bounds.Bounds<number>;
export declare const EMPTY_TIME_BOUNDS: bounds.Bounds;
export declare const emptyBounds: (type: TickType) => bounds.Bounds;
export interface AxisRenderProps {
    grid: grid.Grid;
    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(ctx: aether.Context): void;
    afterDelete(ctx: aether.Context): void;
    renderAxis(props: AxisRenderProps, decimalToDataScale: scale.Scale): void;
    protected iBounds(hold: boolean, fetchDataBounds: () => bounds.Bounds[]): [bounds.Bounds, Error | null];
    dataToDecimalScale(hold: boolean, fetchDataBounds: () => bounds.Bounds[], viewport: box.Box): [scale.Scale, Error | null];
}
export declare const parseAutoBounds: (autoBounds: boolean | {
    lower?: boolean;
    upper?: boolean;
}) => {
    lower: boolean;
    upper: boolean;
};
export {};
//# sourceMappingURL=axis.d.ts.map