import type { DryRunResult, ProgressEvent } from "../sync/orchestrate.js"; import type { OperationResult } from "../sync/types.js"; export type Stats = { [resource: string]: OperationResult; }; export type SyncState = { status: "not_started"; } | { status: "running"; stats: Stats; warnings: string[]; } | { status: "done"; stats: Stats; warnings: string[]; } | { status: "dry_run"; changes: DryRunResult[]; warnings: string[]; } | { status: "error"; error: string; }; export declare const hasFailures: (stats: Stats) => boolean; /** * Exits the Ink app shortly after the command settles, non-zero when it * failed. The delay lets the final frame render before teardown. */ export declare function useExitWhenSettled(settled: boolean, failed: boolean): void; /** * Drives a pull/push generator: progress events feed the shared reducer, and * the app exits (with the right code) once the run settles. `deps` guards the * effect the same way the caller's generator inputs would. */ export declare function useSyncCommand(run: () => AsyncGenerator, deps: unknown[]): SyncState; export declare function Warnings({ warnings }: { warnings: string[]; }): import("react").JSX.Element; export declare function ResourceResults({ stats }: { stats: Stats; }): import("react").JSX.Element;