import { type DurableCommandOptions } from './durable-command'; export type { DurableCommandSnapshot } from './durable-command'; import { type ReactNode } from 'react'; import { type ManagedCommandSnapshot, type ManagedConcurrencyClient } from './managed-command'; export interface UseManagedCommandOptions { client: ManagedConcurrencyClient; command: string; input: Record; storageKey: string; storage?: Pick; autoAccept?: boolean; } /** Mount restores an existing intent; a new submission only starts on start(). */ export declare function useManagedCommand(options: UseManagedCommandOptions): { start: (key?: string) => Promise; resume: () => Promise; submit: () => Promise; cancel: () => Promise; clear: () => void; state: "idle" | "waiting" | "admitted" | "recovering" | "error" | import("openxiangda-contracts").CommandReceipt["state"]; requestKey?: string; waiting?: import("openxiangda-contracts").WaitingReceipt; receipt?: import("openxiangda-contracts").CommandReceipt; errorCode?: string; }; /** Accessible on desktop and mobile; visual styling belongs to the host theme. */ export declare function ManagedCommandStatus({ snapshot, children, errorMessages }: { snapshot: ManagedCommandSnapshot; children?: ReactNode; errorMessages?: Record; }): import("react/jsx-runtime").JSX.Element; /** The heavy subtree is constructed only after admission. Use autoAccept:false. */ export declare function ManagedCommandGate({ snapshot, children, fallback }: { snapshot: ManagedCommandSnapshot; children: () => ReactNode; fallback?: ReactNode; }): import("react/jsx-runtime").JSX.Element; export type UseDurableCommandOptions = Omit & { storage?: DurableCommandOptions['storage']; }; /** Current-actor discovery on mount; submit is an explicit new or original-key retry action. */ export declare function useDurableCommand(options: UseDurableCommandOptions): { submit: (input: Record) => Promise; refresh: () => Promise; resume: () => Promise; stop: () => void; state: "idle" | "recovering" | "error" | import("openxiangda-contracts").CommandReceipt["state"]; initialized: boolean; isObserving: boolean; acceptanceConfirmed: boolean; input?: Readonly>; requestKey?: string; receipt?: import("openxiangda-contracts").CommandReceipt; errorCode?: string; }; //# sourceMappingURL=ManagedCommand.d.ts.map