import { scale } from "@synnaxlabs/x";
import { z } from "zod";
import { aether } from '../../../aether/aether';
import { status } from '../../../status/aether';
import { type Viewport } from '../types';
import { render } from '../../render';
export declare const diagramStateZ: z.ZodObject<{
    position: z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        x: number;
        y: number;
    }, {
        x: number;
        y: number;
    }>;
    zoom: z.ZodNumber;
    region: z.ZodObject<{
        one: z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            x: number;
            y: number;
        }, {
            x: number;
            y: number;
        }>;
        two: z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            x: number;
            y: number;
        }, {
            x: number;
            y: number;
        }>;
        root: z.ZodObject<{
            x: z.ZodEnum<["left", "right"]>;
            y: z.ZodEnum<["top", "bottom"]>;
        }, "strip", z.ZodTypeAny, {
            x: "left" | "right";
            y: "bottom" | "top";
        }, {
            x: "left" | "right";
            y: "bottom" | "top";
        }>;
    }, "strip", z.ZodTypeAny, {
        one: {
            x: number;
            y: number;
        };
        two: {
            x: number;
            y: number;
        };
        root: {
            x: "left" | "right";
            y: "bottom" | "top";
        };
    }, {
        one: {
            x: number;
            y: number;
        };
        two: {
            x: number;
            y: number;
        };
        root: {
            x: "left" | "right";
            y: "bottom" | "top";
        };
    }>;
    clearOverscan: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        x: number;
        y: number;
    }, {
        x: number;
        y: number;
    }>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
        width: z.ZodNumber;
        height: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        width: number;
        height: number;
    }, {
        width: number;
        height: number;
    }>, z.ZodObject<{
        signedWidth: z.ZodNumber;
        signedHeight: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        signedWidth: number;
        signedHeight: number;
    }, {
        signedWidth: number;
        signedHeight: number;
    }>, z.ZodObject<{
        clientX: z.ZodNumber;
        clientY: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        clientX: number;
        clientY: number;
    }, {
        clientX: number;
        clientY: number;
    }>]>>>;
}, "strip", z.ZodTypeAny, {
    position: {
        x: number;
        y: number;
    };
    zoom: number;
    region: {
        one: {
            x: number;
            y: number;
        };
        two: {
            x: number;
            y: number;
        };
        root: {
            x: "left" | "right";
            y: "bottom" | "top";
        };
    };
    clearOverscan: (number | [number, number] | {
        x: number;
        y: number;
    } | {
        width: number;
        height: number;
    } | {
        signedWidth: number;
        signedHeight: number;
    } | {
        clientX: number;
        clientY: number;
    }) & (number | [number, number] | {
        x: number;
        y: number;
    } | {
        width: number;
        height: number;
    } | {
        signedWidth: number;
        signedHeight: number;
    } | {
        clientX: number;
        clientY: number;
    } | undefined);
}, {
    position: {
        x: number;
        y: number;
    };
    zoom: number;
    region: {
        one: {
            x: number;
            y: number;
        };
        two: {
            x: number;
            y: number;
        };
        root: {
            x: "left" | "right";
            y: "bottom" | "top";
        };
    };
    clearOverscan?: number | [number, number] | {
        x: number;
        y: number;
    } | {
        width: number;
        height: number;
    } | {
        signedWidth: number;
        signedHeight: number;
    } | {
        clientX: number;
        clientY: number;
    } | undefined;
}>;
interface ElementProps {
    viewportScale?: scale.XY;
}
export interface Element extends aether.Component {
    render: (props: ElementProps) => Promise<void>;
}
interface InternalState {
    renderCtx: render.Context;
    addStatus: status.Aggregate;
}
export declare const useInitialViewport: () => Viewport;
export declare class Diagram extends aether.Composite<typeof diagramStateZ, InternalState, Element> {
    static readonly TYPE = "Diagram";
    static readonly stateZ: z.ZodObject<{
        position: z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            x: number;
            y: number;
        }, {
            x: number;
            y: number;
        }>;
        zoom: z.ZodNumber;
        region: z.ZodObject<{
            one: z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                x: number;
                y: number;
            }, {
                x: number;
                y: number;
            }>;
            two: z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                x: number;
                y: number;
            }, {
                x: number;
                y: number;
            }>;
            root: z.ZodObject<{
                x: z.ZodEnum<["left", "right"]>;
                y: z.ZodEnum<["top", "bottom"]>;
            }, "strip", z.ZodTypeAny, {
                x: "left" | "right";
                y: "bottom" | "top";
            }, {
                x: "left" | "right";
                y: "bottom" | "top";
            }>;
        }, "strip", z.ZodTypeAny, {
            one: {
                x: number;
                y: number;
            };
            two: {
                x: number;
                y: number;
            };
            root: {
                x: "left" | "right";
                y: "bottom" | "top";
            };
        }, {
            one: {
                x: number;
                y: number;
            };
            two: {
                x: number;
                y: number;
            };
            root: {
                x: "left" | "right";
                y: "bottom" | "top";
            };
        }>;
        clearOverscan: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            x: number;
            y: number;
        }, {
            x: number;
            y: number;
        }>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
            width: z.ZodNumber;
            height: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            width: number;
            height: number;
        }, {
            width: number;
            height: number;
        }>, z.ZodObject<{
            signedWidth: z.ZodNumber;
            signedHeight: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            signedWidth: number;
            signedHeight: number;
        }, {
            signedWidth: number;
            signedHeight: number;
        }>, z.ZodObject<{
            clientX: z.ZodNumber;
            clientY: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            clientX: number;
            clientY: number;
        }, {
            clientX: number;
            clientY: number;
        }>]>>>;
    }, "strip", z.ZodTypeAny, {
        position: {
            x: number;
            y: number;
        };
        zoom: number;
        region: {
            one: {
                x: number;
                y: number;
            };
            two: {
                x: number;
                y: number;
            };
            root: {
                x: "left" | "right";
                y: "bottom" | "top";
            };
        };
        clearOverscan: (number | [number, number] | {
            x: number;
            y: number;
        } | {
            width: number;
            height: number;
        } | {
            signedWidth: number;
            signedHeight: number;
        } | {
            clientX: number;
            clientY: number;
        }) & (number | [number, number] | {
            x: number;
            y: number;
        } | {
            width: number;
            height: number;
        } | {
            signedWidth: number;
            signedHeight: number;
        } | {
            clientX: number;
            clientY: number;
        } | undefined);
    }, {
        position: {
            x: number;
            y: number;
        };
        zoom: number;
        region: {
            one: {
                x: number;
                y: number;
            };
            two: {
                x: number;
                y: number;
            };
            root: {
                x: "left" | "right";
                y: "bottom" | "top";
            };
        };
        clearOverscan?: number | [number, number] | {
            x: number;
            y: number;
        } | {
            width: number;
            height: number;
        } | {
            signedWidth: number;
            signedHeight: number;
        } | {
            clientX: number;
            clientY: number;
        } | undefined;
    }>;
    readonly eraser: render.Eraser;
    schema: z.ZodObject<{
        position: z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            x: number;
            y: number;
        }, {
            x: number;
            y: number;
        }>;
        zoom: z.ZodNumber;
        region: z.ZodObject<{
            one: z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                x: number;
                y: number;
            }, {
                x: number;
                y: number;
            }>;
            two: z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                x: number;
                y: number;
            }, {
                x: number;
                y: number;
            }>;
            root: z.ZodObject<{
                x: z.ZodEnum<["left", "right"]>;
                y: z.ZodEnum<["top", "bottom"]>;
            }, "strip", z.ZodTypeAny, {
                x: "left" | "right";
                y: "bottom" | "top";
            }, {
                x: "left" | "right";
                y: "bottom" | "top";
            }>;
        }, "strip", z.ZodTypeAny, {
            one: {
                x: number;
                y: number;
            };
            two: {
                x: number;
                y: number;
            };
            root: {
                x: "left" | "right";
                y: "bottom" | "top";
            };
        }, {
            one: {
                x: number;
                y: number;
            };
            two: {
                x: number;
                y: number;
            };
            root: {
                x: "left" | "right";
                y: "bottom" | "top";
            };
        }>;
        clearOverscan: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            x: number;
            y: number;
        }, {
            x: number;
            y: number;
        }>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
            width: z.ZodNumber;
            height: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            width: number;
            height: number;
        }, {
            width: number;
            height: number;
        }>, z.ZodObject<{
            signedWidth: z.ZodNumber;
            signedHeight: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            signedWidth: number;
            signedHeight: number;
        }, {
            signedWidth: number;
            signedHeight: number;
        }>, z.ZodObject<{
            clientX: z.ZodNumber;
            clientY: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            clientX: number;
            clientY: number;
        }, {
            clientX: number;
            clientY: number;
        }>]>>>;
    }, "strip", z.ZodTypeAny, {
        position: {
            x: number;
            y: number;
        };
        zoom: number;
        region: {
            one: {
                x: number;
                y: number;
            };
            two: {
                x: number;
                y: number;
            };
            root: {
                x: "left" | "right";
                y: "bottom" | "top";
            };
        };
        clearOverscan: (number | [number, number] | {
            x: number;
            y: number;
        } | {
            width: number;
            height: number;
        } | {
            signedWidth: number;
            signedHeight: number;
        } | {
            clientX: number;
            clientY: number;
        }) & (number | [number, number] | {
            x: number;
            y: number;
        } | {
            width: number;
            height: number;
        } | {
            signedWidth: number;
            signedHeight: number;
        } | {
            clientX: number;
            clientY: number;
        } | undefined);
    }, {
        position: {
            x: number;
            y: number;
        };
        zoom: number;
        region: {
            one: {
                x: number;
                y: number;
            };
            two: {
                x: number;
                y: number;
            };
            root: {
                x: "left" | "right";
                y: "bottom" | "top";
            };
        };
        clearOverscan?: number | [number, number] | {
            x: number;
            y: number;
        } | {
            width: number;
            height: number;
        } | {
            signedWidth: number;
            signedHeight: number;
        } | {
            clientX: number;
            clientY: number;
        } | undefined;
    }>;
    afterUpdate(): Promise<void>;
    afterDelete(): Promise<void>;
    render(): Promise<render.Cleanup | undefined>;
    private requestRender;
}
export declare const REGISTRY: {
    Diagram: typeof Diagram;
};
export {};
