import type { PromptInputProps } from '../interfaces';
import { PortalContainer } from './token-renderer';
export type UpdateSource = 'user-input' | 'external' | 'menu-selection' | 'internal';
export interface ShortcutsConfig {
    menus?: readonly PromptInputProps.MenuDefinition[];
    tokensToText?: (tokens: readonly PromptInputProps.InputToken[]) => string;
}
export declare function extractTokensFromDOM(element: HTMLElement, menus?: readonly PromptInputProps.MenuDefinition[], portalContainers?: Map<string, PortalContainer>): PromptInputProps.InputToken[];
/** Default plain text serialization for tokens. */
export declare function getPromptText(tokens: readonly PromptInputProps.InputToken[]): string;
export declare function findLastPinnedTokenIndex(tokens: readonly PromptInputProps.InputToken[]): number;
/** Scans text tokens for trigger characters and converts them to trigger tokens. */
export declare function detectTriggersInTokens(tokens: readonly PromptInputProps.InputToken[], menus: readonly PromptInputProps.MenuDefinition[], onTriggerDetected?: (detail: PromptInputProps.TriggerDetectedDetail) => boolean, cancelledIds?: Set<string>): PromptInputProps.InputToken[];
export interface ProcessTokensResult {
    tokens: PromptInputProps.InputToken[];
    cancelledIds: Set<string>;
}
export declare function processTokens(tokens: readonly PromptInputProps.InputToken[], config: ShortcutsConfig, options: {
    source: UpdateSource;
    detectTriggers?: boolean;
}, onTriggerDetected?: (detail: PromptInputProps.TriggerDetectedDetail) => boolean, existingCancelledIds?: Set<string>): ProcessTokensResult;
//# sourceMappingURL=token-operations.d.ts.map