import { type TreeNode } from "../internal/file-tree";
import type { WorkspaceEntry } from "./useWorkspaceEntries";
import type { WorkspaceFileLister } from "./WorkspaceFileLister";
/** Options for {@link useWorkspaceFiles}. */
export interface UseWorkspaceFilesOptions {
    /** The workspace entry to list files for (`null` when nothing is selected). */
    readonly entry: WorkspaceEntry | null;
    /** Platform-injected lister callback. `undefined` when the host app does not support file listing. */
    readonly lister: WorkspaceFileLister | undefined;
}
/** Return value of {@link useWorkspaceFiles}. */
export interface UseWorkspaceFilesReturn {
    /** Hierarchical tree built from the file listing, ready for `FileTreeNode`. */
    readonly tree: readonly TreeNode[];
    /** `true` while the lister is being called. */
    readonly isLoading: boolean;
    /** Error from the lister, if any. */
    readonly error: Error | null;
    /** Re-fetch the file listing for the current entry (cache-bust). */
    readonly refresh: () => void;
}
/**
 * Behavior hook that fetches and caches a file listing for a single
 * workspace entry, converting it into a {@link TreeNode} hierarchy.
 *
 * - Calls the platform-injected `lister` when the entry changes.
 * - Caches results per `entry.id` so tab switches and re-expands
 *   are instant without re-fetching.
 * - Returns an empty tree and skips the call when `lister` is
 *   `undefined` (graceful degradation — DD-011 opt-in).
 * - Memoizes the return value for referential stability (DD-010).
 *
 * @example
 * ```tsx
 * const { tree, isLoading, error, refresh } = useWorkspaceFiles({
 *   entry: selectedEntry,
 *   lister: workspaceFileLister,
 * });
 * ```
 */
export declare function useWorkspaceFiles({ entry, lister, }: UseWorkspaceFilesOptions): UseWorkspaceFilesReturn;
//# sourceMappingURL=useWorkspaceFiles.d.ts.map