import React, { ReactNode } from "react";
export declare class Property<V = any> {
    _value?: V;
    watchers: ((value: V) => void)[];
    constructor(value?: V);
    get value(): any;
    set value(value: any);
    watch(watcher: (value: any) => void): () => void;
}
type ConstructorOf<T = any> = new (...args: any[]) => T;
export declare function createCompositeStateProvider<T>(StateClass: ConstructorOf<T>): React.Provider<T>;
export declare class Slot {
    private consume;
    private _current;
    constructor(content?: ReactNode);
    set current(content: ReactNode);
    get current(): ReactNode;
    withConsumer(consume: ((content: ReactNode) => void) | undefined): this;
}
export declare function useCompositeState<T>(StateClass: ConstructorOf<T>): T;
export declare function useGetCompositeStateProperty<V>(property: Property<V>): V;
export declare function useSetCompositeStateProperty<V>(property: Property<V>, value: V | undefined): V | undefined;
export declare function useWatchCompositeStateProperty<V>(property: Property<V>, watcher: (value: V | undefined) => void): void;
export declare function useSlot(slot: Slot): string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
export declare function useWatchSlot(slot: Slot, watcher: (value: ReactNode | undefined) => void): void;
export declare function useDefineSlot(slot: Slot, value: ReactNode | undefined): void;
export {};
//# sourceMappingURL=CompositeState.d.ts.map