import { ReactiveController, ReactiveControllerHost } from 'lit';
import { Context, ContextType } from '@lit/context';
import { ContextConsumer } from '../utils/context/controllers/context-consumer';
/**
 * Support controller to consume a context.
 * Can be used to bridge the context consumer to external frameworks such as React.
 */
export declare class ContextController<TContext extends Context<unknown, unknown>> implements ReactiveController {
    private host;
    private resolveContext?;
    private resolveRef?;
    private _ref?;
    /**
     * The DOM connected element that can subscribe to a context
     */
    get ref(): HTMLElement | undefined;
    set ref(ref: HTMLElement | undefined);
    /**
     * Promise that resolves when a ref is set.
     * @resolves The ref.
     */
    whenRef: Promise<HTMLElement>;
    /**
     * The context consumer. Use `context.value` to get the value of the consumed context.
     */
    context?: ContextConsumer<TContext, ReactiveControllerHost & HTMLElement>;
    /**
     * Promise that resolves when the context is consumed.
     * @resolves The value of the consumed context.
     */
    whenContext?: Promise<ContextType<TContext>>;
    /**
     * @param host - The host element
     * @param context - The Context to use. Should be constructed using createContext().
     */
    constructor(host: ReactiveControllerHost, context: TContext, ref?: HTMLElement);
    private setContext;
    hostUpdate(): void;
}
//# sourceMappingURL=context-controller.d.ts.map