import { connection, Synnax } from '@synnaxlabs/client';
import { z } from 'zod';
import { aether } from '../../aether/aether';
declare const stateZ: z.ZodObject<{
    props: z.ZodNullable<z.ZodObject<{
        host: z.ZodString;
        port: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
        username: z.ZodString;
        password: z.ZodString;
        connectivityPollFrequency: z.ZodDefault<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
            value: z.ZodBigInt;
        }, "strip", z.ZodTypeAny, {
            value: bigint;
        }, {
            value: bigint;
        }>, import('@synnaxlabs/x').TimeSpan, {
            value: bigint;
        }>, z.ZodEffects<z.ZodString, import('@synnaxlabs/x').TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, import('@synnaxlabs/x').TimeSpan, Number>, z.ZodEffects<z.ZodNumber, import('@synnaxlabs/x').TimeSpan, number>, z.ZodType<import('@synnaxlabs/x').TimeSpan, z.ZodTypeDef, import('@synnaxlabs/x').TimeSpan>]>>;
        secure: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        name: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        username: string;
        password: string;
        host: string;
        port: string | number;
        connectivityPollFrequency: import('@synnaxlabs/x').TimeSpan;
        secure: boolean;
        name?: string | undefined;
    }, {
        username: string;
        password: string;
        host: string;
        port: string | number;
        name?: string | undefined;
        connectivityPollFrequency?: string | number | Number | import('@synnaxlabs/x').TimeSpan | {
            value: bigint;
        } | undefined;
        secure?: boolean | undefined;
    }>>;
    state: z.ZodNullable<z.ZodObject<{
        status: z.ZodEnum<["disconnected", "connecting", "connected", "failed"]>;
        error: z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>;
        message: z.ZodOptional<z.ZodString>;
        clusterKey: z.ZodString;
        clientVersion: z.ZodString;
        clientServerCompatible: z.ZodBoolean;
        nodeVersion: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        status: "disconnected" | "connecting" | "connected" | "failed";
        clusterKey: string;
        clientVersion: string;
        clientServerCompatible: boolean;
        message?: string | undefined;
        error?: Error | undefined;
        nodeVersion?: string | undefined;
    }, {
        status: "disconnected" | "connecting" | "connected" | "failed";
        clusterKey: string;
        clientVersion: string;
        clientServerCompatible: boolean;
        message?: string | undefined;
        error?: Error | undefined;
        nodeVersion?: string | undefined;
    }>>;
}, "strip", z.ZodTypeAny, {
    props: {
        username: string;
        password: string;
        host: string;
        port: string | number;
        connectivityPollFrequency: import('@synnaxlabs/x').TimeSpan;
        secure: boolean;
        name?: string | undefined;
    } | null;
    state: {
        status: "disconnected" | "connecting" | "connected" | "failed";
        clusterKey: string;
        clientVersion: string;
        clientServerCompatible: boolean;
        message?: string | undefined;
        error?: Error | undefined;
        nodeVersion?: string | undefined;
    } | null;
}, {
    props: {
        username: string;
        password: string;
        host: string;
        port: string | number;
        name?: string | undefined;
        connectivityPollFrequency?: string | number | Number | import('@synnaxlabs/x').TimeSpan | {
            value: bigint;
        } | undefined;
        secure?: boolean | undefined;
    } | null;
    state: {
        status: "disconnected" | "connecting" | "connected" | "failed";
        clusterKey: string;
        clientVersion: string;
        clientServerCompatible: boolean;
        message?: string | undefined;
        error?: Error | undefined;
        nodeVersion?: string | undefined;
    } | null;
}>;
export interface ContextValue {
    synnax: Synnax | null;
    state: connection.State;
}
export declare const ZERO_CONTEXT_VALUE: ContextValue;
export declare class Provider extends aether.Composite<typeof stateZ, ContextValue> {
    static readonly TYPE = "SynnaxProvider";
    static readonly stateZ: z.ZodObject<{
        props: z.ZodNullable<z.ZodObject<{
            host: z.ZodString;
            port: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
            username: z.ZodString;
            password: z.ZodString;
            connectivityPollFrequency: z.ZodDefault<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
                value: z.ZodBigInt;
            }, "strip", z.ZodTypeAny, {
                value: bigint;
            }, {
                value: bigint;
            }>, import('@synnaxlabs/x').TimeSpan, {
                value: bigint;
            }>, z.ZodEffects<z.ZodString, import('@synnaxlabs/x').TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, import('@synnaxlabs/x').TimeSpan, Number>, z.ZodEffects<z.ZodNumber, import('@synnaxlabs/x').TimeSpan, number>, z.ZodType<import('@synnaxlabs/x').TimeSpan, z.ZodTypeDef, import('@synnaxlabs/x').TimeSpan>]>>;
            secure: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
            name: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            username: string;
            password: string;
            host: string;
            port: string | number;
            connectivityPollFrequency: import('@synnaxlabs/x').TimeSpan;
            secure: boolean;
            name?: string | undefined;
        }, {
            username: string;
            password: string;
            host: string;
            port: string | number;
            name?: string | undefined;
            connectivityPollFrequency?: string | number | Number | import('@synnaxlabs/x').TimeSpan | {
                value: bigint;
            } | undefined;
            secure?: boolean | undefined;
        }>>;
        state: z.ZodNullable<z.ZodObject<{
            status: z.ZodEnum<["disconnected", "connecting", "connected", "failed"]>;
            error: z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>;
            message: z.ZodOptional<z.ZodString>;
            clusterKey: z.ZodString;
            clientVersion: z.ZodString;
            clientServerCompatible: z.ZodBoolean;
            nodeVersion: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "disconnected" | "connecting" | "connected" | "failed";
            clusterKey: string;
            clientVersion: string;
            clientServerCompatible: boolean;
            message?: string | undefined;
            error?: Error | undefined;
            nodeVersion?: string | undefined;
        }, {
            status: "disconnected" | "connecting" | "connected" | "failed";
            clusterKey: string;
            clientVersion: string;
            clientServerCompatible: boolean;
            message?: string | undefined;
            error?: Error | undefined;
            nodeVersion?: string | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        props: {
            username: string;
            password: string;
            host: string;
            port: string | number;
            connectivityPollFrequency: import('@synnaxlabs/x').TimeSpan;
            secure: boolean;
            name?: string | undefined;
        } | null;
        state: {
            status: "disconnected" | "connecting" | "connected" | "failed";
            clusterKey: string;
            clientVersion: string;
            clientServerCompatible: boolean;
            message?: string | undefined;
            error?: Error | undefined;
            nodeVersion?: string | undefined;
        } | null;
    }, {
        props: {
            username: string;
            password: string;
            host: string;
            port: string | number;
            name?: string | undefined;
            connectivityPollFrequency?: string | number | Number | import('@synnaxlabs/x').TimeSpan | {
                value: bigint;
            } | undefined;
            secure?: boolean | undefined;
        } | null;
        state: {
            status: "disconnected" | "connecting" | "connected" | "failed";
            clusterKey: string;
            clientVersion: string;
            clientServerCompatible: boolean;
            message?: string | undefined;
            error?: Error | undefined;
            nodeVersion?: string | undefined;
        } | null;
    }>;
    schema: z.ZodObject<{
        props: z.ZodNullable<z.ZodObject<{
            host: z.ZodString;
            port: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
            username: z.ZodString;
            password: z.ZodString;
            connectivityPollFrequency: z.ZodDefault<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
                value: z.ZodBigInt;
            }, "strip", z.ZodTypeAny, {
                value: bigint;
            }, {
                value: bigint;
            }>, import('@synnaxlabs/x').TimeSpan, {
                value: bigint;
            }>, z.ZodEffects<z.ZodString, import('@synnaxlabs/x').TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, import('@synnaxlabs/x').TimeSpan, Number>, z.ZodEffects<z.ZodNumber, import('@synnaxlabs/x').TimeSpan, number>, z.ZodType<import('@synnaxlabs/x').TimeSpan, z.ZodTypeDef, import('@synnaxlabs/x').TimeSpan>]>>;
            secure: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
            name: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            username: string;
            password: string;
            host: string;
            port: string | number;
            connectivityPollFrequency: import('@synnaxlabs/x').TimeSpan;
            secure: boolean;
            name?: string | undefined;
        }, {
            username: string;
            password: string;
            host: string;
            port: string | number;
            name?: string | undefined;
            connectivityPollFrequency?: string | number | Number | import('@synnaxlabs/x').TimeSpan | {
                value: bigint;
            } | undefined;
            secure?: boolean | undefined;
        }>>;
        state: z.ZodNullable<z.ZodObject<{
            status: z.ZodEnum<["disconnected", "connecting", "connected", "failed"]>;
            error: z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>;
            message: z.ZodOptional<z.ZodString>;
            clusterKey: z.ZodString;
            clientVersion: z.ZodString;
            clientServerCompatible: z.ZodBoolean;
            nodeVersion: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "disconnected" | "connecting" | "connected" | "failed";
            clusterKey: string;
            clientVersion: string;
            clientServerCompatible: boolean;
            message?: string | undefined;
            error?: Error | undefined;
            nodeVersion?: string | undefined;
        }, {
            status: "disconnected" | "connecting" | "connected" | "failed";
            clusterKey: string;
            clientVersion: string;
            clientServerCompatible: boolean;
            message?: string | undefined;
            error?: Error | undefined;
            nodeVersion?: string | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        props: {
            username: string;
            password: string;
            host: string;
            port: string | number;
            connectivityPollFrequency: import('@synnaxlabs/x').TimeSpan;
            secure: boolean;
            name?: string | undefined;
        } | null;
        state: {
            status: "disconnected" | "connecting" | "connected" | "failed";
            clusterKey: string;
            clientVersion: string;
            clientServerCompatible: boolean;
            message?: string | undefined;
            error?: Error | undefined;
            nodeVersion?: string | undefined;
        } | null;
    }, {
        props: {
            username: string;
            password: string;
            host: string;
            port: string | number;
            name?: string | undefined;
            connectivityPollFrequency?: string | number | Number | import('@synnaxlabs/x').TimeSpan | {
                value: bigint;
            } | undefined;
            secure?: boolean | undefined;
        } | null;
        state: {
            status: "disconnected" | "connecting" | "connected" | "failed";
            clusterKey: string;
            clientVersion: string;
            clientServerCompatible: boolean;
            message?: string | undefined;
            error?: Error | undefined;
            nodeVersion?: string | undefined;
        } | null;
    }>;
    afterUpdate(): Promise<void>;
}
export declare const use: (ctx: aether.Context) => Synnax | null;
export declare const REGISTRY: aether.ComponentRegistry;
export {};
//# sourceMappingURL=provider.d.ts.map