/** * Action menu for interactive search mode. * Allows users to perform actions on selected references. */ import type { CitationKeyFormat } from "../../config/schema.js"; import type { CslItem } from "../../core/csl-json/types.js"; import { type SelectOption } from "./components/index.js"; /** * Action types available in the action menu. */ export type ActionType = "show" | "key-default" | "cite-default" | "cite-choose" | "open-url" | "open-fulltext" | "manage-attachments" | "edit" | "output-format" | "remove" | "cancel"; /** * Output format types for the output format submenu. */ export type OutputFormatType = "output-ids" | "output-csl-json" | "output-bibtex" | "output-yaml" | "cancel"; /** * Check if an action is a side-effect action. */ export declare function isSideEffectAction(action: ActionType): boolean; /** * Result from action menu selection. */ export interface ActionMenuResult { /** Selected action type */ action: ActionType; /** Generated output (empty for cancel and side-effect actions) */ output: string; /** Whether the prompt was cancelled */ cancelled: boolean; /** Selected items (for side-effect actions) */ selectedItems?: CslItem[]; } /** * Result from style selection prompt. */ export interface StyleSelectResult { /** Selected style (undefined if cancelled) */ style?: string; /** Whether the prompt was cancelled */ cancelled: boolean; } /** * Config options for action choices. */ export interface ActionChoicesConfig { defaultKeyFormat?: CitationKeyFormat | undefined; } /** * Config options for output generation. */ export interface GenerateOutputConfig { defaultKeyFormat?: CitationKeyFormat | undefined; defaultStyle?: string | undefined; } /** * Generate action choices for the action menu. * Returns different choices based on the number of selected entries. */ export declare function getActionChoices(count: number, config?: ActionChoicesConfig): SelectOption[]; /** * Available action choices for the action menu (default, single entry). * @deprecated Use getActionChoices(count, config) for dynamic choices. */ export declare const ACTION_CHOICES: SelectOption[]; /** * Output format choices for the output format submenu. */ export declare const OUTPUT_FORMAT_CHOICES: SelectOption[]; /** * Available style choices for citation style selection. */ export declare const STYLE_CHOICES: SelectOption[]; /** * Generate output for the given action and items. */ export declare function generateOutput(action: ActionType | OutputFormatType, items: CslItem[], config?: GenerateOutputConfig): string; /** * Run the style selection prompt. */ export declare function runStyleSelectPrompt(): Promise; /** * Run the action menu for selected references. * * @param items - Selected references * @param config - Output generation config * @returns Action result with output */ export declare function runActionMenu(items: CslItem[], config?: GenerateOutputConfig): Promise; //# sourceMappingURL=action-menu.d.ts.map