import type { DeepPartial } from '../types';
export interface ThemeLeaf<Value> {
    $type: string;
    $value: Value;
    $constant?: boolean;
    $comment?: string;
}
export type ThemeDefinition = {
    [key: string]: ThemeLeaf<unknown> | ThemeDefinition;
};
export type ToThemeIFace<Node, Extension = never> = Node extends ThemeLeaf<infer LeafVal> ? (LeafVal extends null ? LeafVal | string : LeafVal) | Extension : Node extends object ? {
    readonly [Key in keyof Node as Key extends '$comment' ? never : Key]: ToThemeIFace<Node[Key], Extension>;
} : Node | Extension;
export type SettableTheme<Def extends ThemeDefinition> = DeepPartial<ToThemeIFace<Def, symbol>>;
export declare const resetToInitial: unique symbol;
export interface ThemeMachineLike<Definition extends ThemeDefinition> {
    parent: ThemeMachineLike<Definition> | null;
    definition: Definition;
    overrides: Map<string, boolean>;
    readonly theme: ToThemeIFace<Definition>;
}
declare class ThemeMachine<Definition extends ThemeDefinition> implements ThemeMachineLike<Definition> {
    parent: ThemeMachineLike<Definition> | null;
    definition: Definition;
    overrides: Map<string, boolean>;
    readonly theme: ToThemeIFace<Definition>;
    overrideInTree(keys: string[]): boolean;
    constructTheme(theme: SettableTheme<Definition>): ToThemeIFace<Definition>;
    constructor({ theme, parent, definition }: {
        theme?: SettableTheme<Definition>;
        parent: ThemeMachineLike<Definition>;
        definition?: never;
    } | {
        theme?: SettableTheme<Definition>;
        parent?: never;
        definition: Definition;
    });
}
export default ThemeMachine;
//# sourceMappingURL=ThemeMachine.d.ts.map