import { type ReactNode } from 'react'; import type { ArkmeEnvironment, ArkmeSourceItem, ArkmeTopicDissolveProgress, ArkmeTopicDissolveTask } from '../types.js'; import { type ArkmeSelfTopicSort } from './self-topic-sort-preference.js'; export interface ArkmeSourceBreadcrumbSegment { key: string; label: string; source?: ArkmeSourceItem; trailIndex?: number; root: boolean; current: boolean; } export interface ArkmeSelfTopicOption { source: ArkmeSourceItem; depth: number; } /** Matches the three topic-order choices offered by the mobile topic list. */ export type { ArkmeSelfTopicSort } from './self-topic-sort-preference.js'; export type ArkmeSelfTopicChildCreator = (parent: ArkmeSourceItem, parentLevel: number) => void; export type ArkmeSelfTopicRenamer = (topic: ArkmeSourceItem, title: string) => Promise; export type ArkmeSelfTopicDissolver = (topic: ArkmeSourceItem, parent: ArkmeSourceItem | undefined, children: readonly ArkmeSourceItem[], onProgress: (progress: ArkmeTopicDissolveProgress) => void) => Promise; /** The assignment entry uses the same menu; only selection semantics differ. */ export interface ArkmeTopicAssignmentPresentation { anchor?: HTMLElement | undefined; count: number; disabled: boolean; busy: boolean; hidden?: boolean; onClose(): void; onRelease?: (() => void) | undefined; status?: ReactNode; } export type ArkmeTopicDropPosition = 'before' | 'into' | 'after'; /** Split a topic row into a narrow reorder edge and a generous nesting center. */ export declare function arkmeTopicDropPosition(clientY: number, rect: Pick): ArkmeTopicDropPosition; /** Return one frame of proportional list scrolling while a drag hugs an edge. */ export declare function arkmeTopicDragAutoScrollDelta(clientX: number, clientY: number, rect: Pick, edgeSize?: number, minimumSpeed?: number, maximumSpeed?: number): number; /** Move one visited personal destination to the end without keeping an older duplicate. */ export declare function appendArkmeSourceBreadcrumbTrail(trail: ArkmeSourceItem[], selectedSource: ArkmeSourceItem | undefined, sources: readonly ArkmeSourceItem[]): ArkmeSourceItem[]; /** Return to one visited destination and discard everything visited after it. */ export declare function truncateArkmeSourceBreadcrumbTrail(trail: readonly ArkmeSourceItem[], trailIndex: number): ArkmeSourceItem[]; /** Keep this data helper for existing consumers while the header itself uses a topic selector. */ export declare function arkmeSourceBreadcrumb(trail: readonly ArkmeSourceItem[], sources: readonly ArkmeSourceItem[]): ArkmeSourceBreadcrumbSegment[]; /** Flatten the existing personal-topic tree for the compact header selector. */ export declare function arkmeSelfTopicOptions(sources: readonly ArkmeSourceItem[], sort?: ArkmeSelfTopicSort): ArkmeSelfTopicOption[]; /** Keep the same expandable hierarchy used by the full topic directory. */ export declare function arkmeSelfTopicTreeRows(sources: readonly ArkmeSourceItem[], collapsedSourceRefs: ReadonlySet, sort?: ArkmeSelfTopicSort): import("./source-tree.js").ArkmeSourceTreeRow[]; export declare function arkmeSelfTopicSelectionPath(selectedSource: ArkmeSourceItem | undefined, sources?: readonly ArkmeSourceItem[]): string[]; export declare function arkmeSelfTopicSelectionLabel(selectedSource: ArkmeSourceItem | undefined, sources?: readonly ArkmeSourceItem[]): string; export declare function ArkmeSourceBreadcrumb({ userId, environment, selectedSource, sources, loading, countsReady, error, onSelect, onSelectAggregate, onCreateTopic, onCreateChildTopic, onRenameTopic, onDissolveTopic, onRetry, onMoveTopic, activeDissolve, tourOpen, trigger, onOpen, assignment, showRootTitle, }: { userId?: number | undefined; environment?: ArkmeEnvironment; selectedSource: ArkmeSourceItem | undefined; sources: readonly ArkmeSourceItem[]; loading?: boolean; countsReady?: boolean | undefined; error?: string; tourOpen?: boolean | undefined; trigger?: 'visible' | 'none'; /** The conversation header can own the fixed name separately from this selector. */ showRootTitle?: boolean; onSelect(source: ArkmeSourceItem): void; onSelectAggregate(): void; onOpen?(): void; onCreateTopic?(): void; onCreateChildTopic?: ArkmeSelfTopicChildCreator; onRenameTopic?: ArkmeSelfTopicRenamer; onDissolveTopic?: ArkmeSelfTopicDissolver; onRetry?(): void; onMoveTopic?(source: ArkmeSourceItem, currentParent: ArkmeSourceItem | undefined, nextParent: ArkmeSourceItem | undefined, insertBefore: ArkmeSourceItem | undefined): Promise; activeDissolve?: ArkmeTopicDissolveTask; assignment?: ArkmeTopicAssignmentPresentation; }): import("react").JSX.Element; //# sourceMappingURL=ArkmeSourceBreadcrumb.d.ts.map