import { label, ontology, ranger } from '@synnaxlabs/client';
import { Optional } from '@synnaxlabs/x';
import { z } from 'zod';
import { Flux } from '../flux';
import { Label } from '../label';
import { Ontology } from '../ontology';
import { ranger as aetherRanger } from './aether';
export interface KVFluxStore extends Flux.UnaryStore<string, ranger.KVPair> {
}
export interface AliasFluxStore extends Flux.UnaryStore<ranger.Key, ranger.Alias> {
}
export declare const RANGE_KV_FLUX_STORE_KEY = "rangeKV";
export declare const RANGE_ALIASES_FLUX_STORE_KEY = "rangeAliases";
interface SubStore extends Flux.Store {
    [aetherRanger.FLUX_STORE_KEY]: aetherRanger.FluxStore;
    [Ontology.RELATIONSHIPS_FLUX_STORE_KEY]: Ontology.RelationshipFluxStore;
    [Label.FLUX_STORE_KEY]: Label.FluxStore;
    [RANGE_KV_FLUX_STORE_KEY]: KVFluxStore;
    [RANGE_ALIASES_FLUX_STORE_KEY]: AliasFluxStore;
}
export declare const useSetSynchronizer: (onSet: (range: ranger.Payload) => void) => void;
export declare const useDeleteSynchronizer: (onDelete: (key: ranger.Key) => void) => void;
export interface ChildrenParams {
    key: ranger.Key;
}
export declare const useChildren: Flux.UseList<ChildrenParams, string, ranger.Range>;
export declare const retrieveParent: Flux.CreateRetrieveReturn<{
    id: ontology.ID;
}, ranger.Range | null>;
export interface RetrieveParams {
    key: ranger.Key;
}
export declare const retrieve: Flux.CreateRetrieveReturn<RetrieveParams, ranger.Range>;
export declare const useRetrieve: (args: Flux.UseDirectRetrieveArgs<RetrieveParams>) => Flux.UseDirectRetrieveReturn<ranger.Range>;
export declare const formSchema: z.ZodObject<{
    labels: z.ZodArray<z.ZodUUID>;
    parent: z.ZodOptional<z.ZodString>;
    timeRange: z.ZodObject<{
        start: z.ZodNumber;
        end: z.ZodNumber;
    }, z.core.$strip>;
    key: z.ZodOptional<z.ZodUUID>;
    color: z.ZodOptional<z.ZodString>;
    name: z.ZodString;
}, z.core.$strip>;
export declare const toFormValues: (range: ranger.Range) => Promise<z.infer<typeof formSchema>>;
export interface UseFormQueryParams extends Optional<RetrieveParams, "key"> {
}
export declare const useForm: Flux.UseForm<UseFormQueryParams, z.ZodObject<{
    labels: z.ZodArray<z.ZodUUID>;
    parent: z.ZodOptional<z.ZodString>;
    timeRange: z.ZodObject<{
        start: z.ZodNumber;
        end: z.ZodNumber;
    }, z.core.$strip>;
    key: z.ZodOptional<z.ZodUUID>;
    color: z.ZodOptional<z.ZodString>;
    name: z.ZodString;
}, z.core.$strip>>;
export declare const useLabels: (key: ranger.Key) => Flux.UseDirectRetrieveReturn<label.Label[]>;
export interface ListParams extends Pick<ranger.RetrieveRequest, "includeLabels" | "includeParent" | "searchTerm" | "offset" | "limit" | "keys"> {
}
export declare const useList: Flux.UseList<ListParams, string, ranger.Range>;
export declare const metaDataFormSchema: z.ZodObject<{
    pairs: z.ZodArray<z.ZodObject<{
        key: z.ZodString;
        value: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
export interface ListKVParams {
    rangeKey: ranger.Key;
}
export declare const KV_FLUX_STORE_CONFIG: Flux.UnaryStoreConfig<SubStore>;
export declare const useListKV: Flux.UseList<ListKVParams, string, ranger.KVPair>;
export declare const kvPairFormSchema: z.ZodObject<{
    range: z.ZodUUID;
    key: z.ZodString;
    value: z.ZodString;
}, z.core.$strip>;
export declare const useKVPairForm: Flux.UseForm<ListKVParams, z.ZodObject<{
    range: z.ZodUUID;
    key: z.ZodString;
    value: z.ZodString;
}, z.core.$strip>>;
export declare const useDeleteKV: Flux.CreateUpdateReturn<ListKVParams, string>;
export declare const useUpdateKV: Flux.CreateUpdateReturn<ListKVParams, ranger.KVPair>;
export interface UpdateParams {
}
export declare const useUpdate: Flux.CreateUpdateReturn<UpdateParams, {
    key: string;
    name: string;
    timeRange: import('@synnaxlabs/x').TimeRange;
    parent: /*elided*/ any | null;
    color?: string | undefined;
    labels?: {
        key: string;
        name: string;
        color: string;
    }[] | undefined;
}>;
export declare const useDelete: Flux.CreateUpdateReturn<UpdateParams, string | ranger.Keys>;
export declare const ALIAS_FLUX_STORE_CONFIG: Flux.UnaryStoreConfig<SubStore>;
export {};
//# sourceMappingURL=queries.d.ts.map