import { ExtraEditMessage } from 'telegraf/typings/telegram-types'; import { IMenu, MenuBuilder } from 'telegram-inline-menu'; export declare const SYM_DYNAMIC_INLINE_MENU: unique symbol; /** * Creates an object indicating that an inline menu should be shown. * * @export * @param {(IMenu | Func>)} layout The layout of the menu. * @returns The object for inline menu message. */ export declare function inlineMenu(layout: IMenu | Func, any>): { inlineMenu: (resolver: (resolveWith: any) => void) => IMenu | Promise; } | { inlineMenu: IMenu; }; /** * Indicates whether an object is an inline menu indicator or not. * * @export * @type {T} The type of the inline menu items. * @param {*} object Object to check. * @returns {IInlineMenuInfo} `true` * if the object is inline menu indicator object. */ export declare function isInlineMenu(object: any): object is IInlineMenuInfo; export interface IInlineMenuInfo { /** * The inline menu or the builder of it. * * @memberof IInlineMenuInfo */ inlineMenu: IMenu | Promise | MenuBuilder | ((resolve: (resolveWith: any) => void, reject: (e: Error) => void) => IMenu | Promise); /** * Indicates whether the menu should be closed on timeout or not. * * @type {boolean} * @memberof IInlineOptionsInformation */ closeOnTimeout?: boolean; /** * The message to be sent when timeout occurs. * * @type {string} * @memberof IInlineOptionsInformation */ timeoutMessage?: string; /** * A function to be executed when an item is selected. * * Setting this will make the generator NON-BLOCKING. * * @type {Function} * @memberof IInlineOptionsInformation */ onSelected?(item: T): { message?: string; } | void | undefined; /** * The extras of the template message. * * @type {ExtraEditMessage} * @memberof IInlineOptionsInformation */ extra?: ExtraEditMessage; }