import { type Dispatch, type SetStateAction } from "react"; import { type RepoDraft } from "./session-tools.js"; import type { GitHubRepository, PersonalGitHubRepositoryCatalogItem } from "../types.js"; /** * A restored draft can hold a manual row for a workspace repository: its * GitHub identity retained while the catalog was unknown, or a bare URL for the * same remote. Once the catalog is known, fold that row into the catalog * selection so the picker shows the repository checked and it is attached * exactly once. See reconcileManualRepositoriesWithCatalog for the rules. * * The fold writes plain values computed from one committed render, so it runs * as a layout effect inside that commit. A passive effect would run only when * the next render starts, after a picker toggle, workspace reset or draft * hydration may already have queued its own update, and the older values would * then overwrite that update. */ export declare function useManualRepositoryCatalogReconciliation(input: { manualRepos: RepoDraft[]; selectedRepoIds: Set; selectedRepoRefs: Record; repositories: GitHubRepository[]; catalogReady: boolean; /** The personal GitHub selection; a repository selected there keeps that authority. */ personalRepositories: PersonalGitHubRepositoryCatalogItem[]; selectedPersonalRepoIds: Set; selectedPersonalRepoRefs: Record; setManualRepos: Dispatch>; setSelectedRepoIds: Dispatch>>; setSelectedRepoRefs: Dispatch>>; }): void;