import { type ReactNode } from "react"; import { type ManualRepositoryAttachResult } from "./manual-repository-editor.js"; import { type RepoDraft, type RepositoryGroup } from "../lib/session-tools.js"; import type { GitHubAppSetupMode, GitHubBindingStatus, GitHubInstallationBinding, GitHubRepository, PersonalGitHubConnectionStatusResponse, PersonalGitHubRepositoryCatalogItem, ResourceRef } from "../types.js"; export declare function repositoryBindingPresentation(status: GitHubBindingStatus, installUrl: string | null, setupMode?: GitHubAppSetupMode): { setupDescription: string; emptyDescription: string; connectUrl: string | null; connectLabel: string; healthy: boolean; canRefresh: boolean; }; export type RepositoryContextPickerProps = { setupMode: GitHubAppSetupMode; configured: boolean; status: GitHubBindingStatus; installUrl: string | null; linkUrl: string | null; installations: GitHubInstallationBinding[]; repositories: GitHubRepository[]; personalGitHubStatus?: PersonalGitHubConnectionStatusResponse | null | undefined; personalGitHubRepositories?: PersonalGitHubRepositoryCatalogItem[] | undefined; selectedPersonalGitHubRepoIds?: Set | undefined; selectedPersonalGitHubRepoRefs?: Record | undefined; personalGitHubBusy?: boolean | undefined; onConnectPersonalGitHub?: (() => void) | undefined; onTogglePersonalGitHubRepo?: ((repo: PersonalGitHubRepositoryCatalogItem) => void) | undefined; onPersonalGitHubRefChange?: ((repositoryId: string, ref: string) => void) | undefined; groups: RepositoryGroup[]; selectedRepoIds: Set; selectedRepoRefs: Record; selectedInstallationId: number | null; manualRepos: RepoDraft[]; manualOpen: boolean; githubAppOpen: boolean; org: string; pending: boolean; repoBusy: boolean; githubAppBusy: boolean; onRefresh: () => Promise; /** Passive open refresh. Caller owns provider-sync permissions and throttling. */ onOpenRefresh?: (() => Promise) | undefined; /** False when the current principal cannot read either repository catalog. */ refreshAllowed?: boolean | undefined; onToggleRepo: (repo: GitHubRepository) => void; onRefChange: (repoId: number, ref: string) => void; onManualOpenChange: (open: boolean) => void; onManualAdd: () => void; onManualUpdate: (id: number, patch: Partial) => void; onManualRemove: (id: number) => void; onManualAttach?: ((repository: RepoDraft) => Promise) | undefined; onLoadGitHubBranches?: ((repository: GitHubRepository) => Promise) | undefined; onLoadPersonalGitHubBranches?: ((repository: PersonalGitHubRepositoryCatalogItem) => Promise) | undefined; onGitHubAppOpenChange: (open: boolean) => void; onOrgChange: (value: string) => void; onStartGitHubApp: () => void; /** * Starts workspace App setup. The link is minted on click: `installUrl` only * gates whether this principal may connect, because a page-load link expires. */ onConnectWorkspaceApp: () => void; /** Opens one installation's GitHub repository settings through a fresh link. */ onConfigureInstallation: (installationId: number) => Promise; onDisconnectInstallation: (installationId: number) => Promise; /** Repositories already mounted on an additive surface cannot be removed or retargeted. */ lockedRepoIds?: ReadonlySet | undefined; /** Personal repositories already mounted on an additive surface cannot be removed or retargeted. */ lockedPersonalGitHubRepoIds?: ReadonlySet | undefined; /** Manual rows already mounted on an additive surface are rendered read-only. */ lockedManualRepoIds?: ReadonlySet | undefined; /** Mounted personal sources may outlive their currently authorized catalog entry. */ unavailableMountedRepositories?: ReadonlyArray<{ uri: string; ref: string; }> | undefined; /** Inline validation for pending manual repository additions. */ validationError?: string | null | undefined; /** New-chat route used to explain immutable mounted follow-up resources. */ newChatUrl?: string | undefined; /** Optional back control when embedded in the mobile “+” drill-in. */ leading?: ReactNode | undefined; /** Extra classes on the bar trigger (e.g. `max-sm:hidden` when opened from +). */ triggerClassName?: string | undefined; }; /** Shared picker body — desktop dropdown and mobile “+” drill-in. */ export declare function RepositoryContextMenuBody(props: RepositoryContextPickerProps): import("react").JSX.Element; export declare function RepositoryContextPicker(props: RepositoryContextPickerProps): import("react").JSX.Element; export declare function ScheduledTaskRepositoryPicker(props: { status: GitHubBindingStatus; repositories: GitHubRepository[]; groups: RepositoryGroup[]; resources: ResourceRef[]; busy: boolean; repoBusy: boolean; onRefresh: () => Promise; onResourcesChange: (resources: ResourceRef[]) => void; }): import("react").JSX.Element;