import type * as Command$ from '@effect/cli/Command';
import { type Atom, type Registry } from '@effect-atom/atom-react';
import * as Effect from 'effect/Effect';
import type * as Layer$ from 'effect/Layer';
import type * as ManagedRuntime$ from 'effect/ManagedRuntime';
import type { FC, PropsWithChildren } from 'react';
import type { OperationInvoker as OperationInvoker$, OperationResolver as OperationResolver$ } from '@dxos/operation';
import { Capability as Capability$, type PluginManager as PluginManager$ } from '../core';
import type { HistoryTracker as HistoryTracker$, UndoMapping as UndoMapping$, UndoRegistry as UndoRegistry$ } from '../plugin-operation';
import type { Surface } from '../ui';
/**
 * Null capability.
 * @category Capability
 */
export declare const Null: Capability$.InterfaceDef<null>;
/**
 * @category Capability
 */
export declare const PluginManager: Capability$.InterfaceDef<PluginManager$.PluginManager>;
/**
 * @category Capability
 */
export declare const AtomRegistry: Capability$.InterfaceDef<Registry.Registry>;
export type ReactContext = Readonly<{
    id: string;
    dependsOn?: string[];
    context: FC<PropsWithChildren>;
}>;
/**
 * @category Capability
 */
export declare const ReactContext: Capability$.InterfaceDef<Readonly<{
    id: string;
    dependsOn?: string[];
    context: FC<PropsWithChildren>;
}>>;
export type ReactRoot = Readonly<{
    id: string;
    root: FC<PropsWithChildren>;
}>;
/**
 * @category Capability
 */
export declare const ReactRoot: Capability$.InterfaceDef<Readonly<{
    id: string;
    root: FC<PropsWithChildren>;
}>>;
/**
 * Surface definitions that can be either React components or Web Components.
 */
export type ReactSurface = Surface.Definition | readonly Surface.Definition[];
/**
 * @category Capability
 */
export declare const ReactSurface: Capability$.InterfaceDef<ReactSurface>;
export type AnyCommand = Command$.Command<any, any, any, any>;
/**
 * @category Capability
 */
export declare const Command: Capability$.InterfaceDef<AnyCommand>;
/**
 * @category Capability
 */
export declare const Layer: Capability$.InterfaceDef<Layer$.Layer<any, any, any>>;
export type ManagedRuntime = ManagedRuntime$.ManagedRuntime<any, any>;
/**
 * @category Capability
 */
export declare const ManagedRuntime: Capability$.InterfaceDef<ManagedRuntime>;
export type OperationResolver = OperationResolver$.OperationResolver<any, any, any, any>;
/**
 * Handler registration for operations - contributed by plugins.
 * @category Capability
 */
export declare const OperationResolver: Capability$.InterfaceDef<OperationResolver[]>;
export type UndoMapping = UndoMapping$.UndoMapping;
/**
 * Undo mapping registration - contributed by plugins.
 * @category Capability
 */
export declare const UndoMapping: Capability$.InterfaceDef<UndoMapping[]>;
export type OperationInvoker = OperationInvoker$.OperationInvoker;
/**
 * Operation invoker - provided by OperationPlugin.
 * @category Capability
 */
export declare const OperationInvoker: Capability$.InterfaceDef<OperationInvoker$.OperationInvoker>;
export type UndoRegistry = UndoRegistry$.UndoRegistry;
/**
 * Undo registry - provided by OperationPlugin.
 * @category Capability
 */
export declare const UndoRegistry: Capability$.InterfaceDef<UndoRegistry$.UndoRegistry>;
export type HistoryTracker = HistoryTracker$.HistoryTracker;
/**
 * History tracker - provided by OperationPlugin.
 * @category Capability
 */
export declare const HistoryTracker: Capability$.InterfaceDef<HistoryTracker$.HistoryTracker>;
/**
 * Get the current value of an atom capability.
 * @example const settings = yield* Capabilities.getAtomValue(ThreadCapabilities.Settings);
 */
export declare const getAtomValue: <T>(atomCapability: Capability$.InterfaceDef<Atom.Atom<T>>) => Effect.Effect<T, Error, Capability$.Service>;
/**
 * Update an atom capability value (requires writable atom).
 * @example yield* Capabilities.updateAtomValue(ThreadCapabilities.Settings, (s) => ({ ...s, foo: true }));
 */
export declare const updateAtomValue: <T>(atomCapability: Capability$.InterfaceDef<Atom.Writable<T>>, fn: (current: T) => T) => Effect.Effect<void, Error, Capability$.Service>;
/**
 * Subscribe to an atom capability.
 * @example const unsubscribe = yield* Capabilities.subscribeAtom(ThreadCapabilities.Settings, (value) => ...);
 */
export declare const subscribeAtom: <T>(atomCapability: Capability$.InterfaceDef<Atom.Atom<T>>, callback: (value: T) => void) => Effect.Effect<() => void, Error, Capability$.Service>;
//# sourceMappingURL=capabilities.d.ts.map