import { color } from '@synnaxlabs/x';
import { scale } from '@synnaxlabs/x/spatial';
import { z } from 'zod';
import { aether } from '../../../aether/aether';
import { telem } from '../../../telem/aether';
import { theming } from '../../../theming/aether';
import { Element } from '../../diagram/aether/Diagram';
import { render } from '../../render';
declare const valueState: z.ZodObject<{
    box: z.ZodObject<{
        one: z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, z.core.$strip>;
        two: z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, z.core.$strip>;
        root: z.ZodObject<{
            x: z.ZodEnum<{
                right: "right";
                left: "left";
            }>;
            y: z.ZodEnum<{
                top: "top";
                bottom: "bottom";
            }>;
        }, z.core.$strip>;
    }, z.core.$strip>;
    telem: z.ZodDefault<z.ZodOptional<z.ZodObject<{
        type: z.ZodString;
        props: z.ZodAny;
        transfer: z.ZodOptional<z.ZodArray<z.ZodCustom<ArrayBuffer, ArrayBuffer>>>;
        variant: z.ZodLiteral<"source">;
        valueType: z.ZodLiteral<"string">;
    }, z.core.$strip>>>;
    backgroundTelem: z.ZodDefault<z.ZodOptional<z.ZodObject<{
        type: z.ZodString;
        props: z.ZodAny;
        transfer: z.ZodOptional<z.ZodArray<z.ZodCustom<ArrayBuffer, ArrayBuffer>>>;
        variant: z.ZodLiteral<"source">;
        valueType: z.ZodLiteral<"color">;
    }, z.core.$strip>>>;
    level: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
        small: "small";
        h1: "h1";
        h2: "h2";
        h3: "h3";
        h4: "h4";
        h5: "h5";
        p: "p";
    }>>>;
    color: z.ZodDefault<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];
    }>>>>;
    precision: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
    stalenessTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
    stalenessColor: z.ZodDefault<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];
    }>>>>;
    minWidth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
    width: z.ZodOptional<z.ZodNumber>;
    notation: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
        standard: "standard";
        scientific: "scientific";
        engineering: "engineering";
    }>>>;
    location: z.ZodDefault<z.ZodOptional<z.ZodObject<{
        x: z.ZodUnion<[z.ZodEnum<{
            right: "right";
            left: "left";
        }>, z.ZodEnum<{
            center: "center";
        }>]>;
        y: z.ZodUnion<[z.ZodEnum<{
            top: "top";
            bottom: "bottom";
        }>, z.ZodEnum<{
            center: "center";
        }>]>;
    }, z.core.$strip>>>;
    useWidthForBackground: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    valueBackgroundShift: z.ZodDefault<z.ZodOptional<z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, z.core.$strip>>>;
    valueBackgroundOverScan: z.ZodDefault<z.ZodOptional<z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, z.core.$strip>>>;
}, z.core.$strip>;
export interface ValueProps {
    scale?: scale.XY;
}
interface InternalState {
    theme: theming.Theme;
    renderCtx: render.Context;
    telem: telem.StringSource;
    stopListening?: () => void;
    backgroundTelem: telem.ColorSource;
    stopListeningBackground?: () => void;
    requestRender: render.Requestor | null;
    textColor: color.Color;
    fontString: string;
    lastReceived: number;
}
export declare class Value extends aether.Leaf<typeof valueState, InternalState> implements Element {
    static readonly TYPE = "value";
    static readonly z: z.ZodObject<{
        box: z.ZodObject<{
            one: z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, z.core.$strip>;
            two: z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, z.core.$strip>;
            root: z.ZodObject<{
                x: z.ZodEnum<{
                    right: "right";
                    left: "left";
                }>;
                y: z.ZodEnum<{
                    top: "top";
                    bottom: "bottom";
                }>;
            }, z.core.$strip>;
        }, z.core.$strip>;
        telem: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            type: z.ZodString;
            props: z.ZodAny;
            transfer: z.ZodOptional<z.ZodArray<z.ZodCustom<ArrayBuffer, ArrayBuffer>>>;
            variant: z.ZodLiteral<"source">;
            valueType: z.ZodLiteral<"string">;
        }, z.core.$strip>>>;
        backgroundTelem: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            type: z.ZodString;
            props: z.ZodAny;
            transfer: z.ZodOptional<z.ZodArray<z.ZodCustom<ArrayBuffer, ArrayBuffer>>>;
            variant: z.ZodLiteral<"source">;
            valueType: z.ZodLiteral<"color">;
        }, z.core.$strip>>>;
        level: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
            small: "small";
            h1: "h1";
            h2: "h2";
            h3: "h3";
            h4: "h4";
            h5: "h5";
            p: "p";
        }>>>;
        color: z.ZodDefault<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];
        }>>>>;
        precision: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
        stalenessTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
        stalenessColor: z.ZodDefault<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];
        }>>>>;
        minWidth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
        width: z.ZodOptional<z.ZodNumber>;
        notation: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
            standard: "standard";
            scientific: "scientific";
            engineering: "engineering";
        }>>>;
        location: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            x: z.ZodUnion<[z.ZodEnum<{
                right: "right";
                left: "left";
            }>, z.ZodEnum<{
                center: "center";
            }>]>;
            y: z.ZodUnion<[z.ZodEnum<{
                top: "top";
                bottom: "bottom";
            }>, z.ZodEnum<{
                center: "center";
            }>]>;
        }, z.core.$strip>>>;
        useWidthForBackground: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        valueBackgroundShift: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, z.core.$strip>>>;
        valueBackgroundOverScan: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, z.core.$strip>>>;
    }, z.core.$strip>;
    schema: z.ZodObject<{
        box: z.ZodObject<{
            one: z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, z.core.$strip>;
            two: z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, z.core.$strip>;
            root: z.ZodObject<{
                x: z.ZodEnum<{
                    right: "right";
                    left: "left";
                }>;
                y: z.ZodEnum<{
                    top: "top";
                    bottom: "bottom";
                }>;
            }, z.core.$strip>;
        }, z.core.$strip>;
        telem: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            type: z.ZodString;
            props: z.ZodAny;
            transfer: z.ZodOptional<z.ZodArray<z.ZodCustom<ArrayBuffer, ArrayBuffer>>>;
            variant: z.ZodLiteral<"source">;
            valueType: z.ZodLiteral<"string">;
        }, z.core.$strip>>>;
        backgroundTelem: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            type: z.ZodString;
            props: z.ZodAny;
            transfer: z.ZodOptional<z.ZodArray<z.ZodCustom<ArrayBuffer, ArrayBuffer>>>;
            variant: z.ZodLiteral<"source">;
            valueType: z.ZodLiteral<"color">;
        }, z.core.$strip>>>;
        level: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
            small: "small";
            h1: "h1";
            h2: "h2";
            h3: "h3";
            h4: "h4";
            h5: "h5";
            p: "p";
        }>>>;
        color: z.ZodDefault<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];
        }>>>>;
        precision: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
        stalenessTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
        stalenessColor: z.ZodDefault<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];
        }>>>>;
        minWidth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
        width: z.ZodOptional<z.ZodNumber>;
        notation: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
            standard: "standard";
            scientific: "scientific";
            engineering: "engineering";
        }>>>;
        location: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            x: z.ZodUnion<[z.ZodEnum<{
                right: "right";
                left: "left";
            }>, z.ZodEnum<{
                center: "center";
            }>]>;
            y: z.ZodUnion<[z.ZodEnum<{
                top: "top";
                bottom: "bottom";
            }>, z.ZodEnum<{
                center: "center";
            }>]>;
        }, z.core.$strip>>>;
        useWidthForBackground: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        valueBackgroundShift: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, z.core.$strip>>>;
        valueBackgroundOverScan: z.ZodDefault<z.ZodOptional<z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, z.core.$strip>>>;
    }, z.core.$strip>;
    afterUpdate(ctx: aether.Context): void;
    afterDelete(): void;
    private requestRender;
    private get fontHeight();
    private maybeUpdateWidth;
    private getTextColor;
    render({ viewportScale }: {
        viewportScale?: scale.XY | undefined;
    }): void;
}
export declare const REGISTRY: aether.ComponentRegistry;
export {};
//# sourceMappingURL=value.d.ts.map