import type * as Interfaces from '@puregram/api'; import type { ButtonStyleParams, CallbackData } from './types.js'; interface TextButtonParams { text: string; payload: CallbackData; } interface UrlButtonParams { text: string; url: string; payload?: CallbackData; } interface WebAppButtonParams { text: string; url: string; } interface SwitchToCurrentChatButtonParams { text: string; query: string; } interface SwitchToChatButtonParams { text: string; query: string; } interface SwitchToChosenChatButtonParams { text: string; query?: string; allowUserChats?: boolean; allowBotChats?: boolean; allowGroupChats?: boolean; allowChannelChats?: boolean; } interface GameButtonParams { text: string; game: Interfaces.TelegramCallbackGame; } interface PayButtonParams { text: string; } interface LoginButtonParams { text: string; loginUrl: Interfaces.TelegramLoginUrl; } type TextButtonParamsWithStyle = TextButtonParams & ButtonStyleParams; type UrlButtonParamsWithStyle = UrlButtonParams & ButtonStyleParams; type WebAppButtonParamsWithStyle = WebAppButtonParams & ButtonStyleParams; type SwitchToCurrentChatButtonParamsWithStyle = SwitchToCurrentChatButtonParams & ButtonStyleParams; type SwitchToChatButtonParamsWithStyle = SwitchToChatButtonParams & ButtonStyleParams; type SwitchToChosenChatButtonParamsWithStyle = SwitchToChosenChatButtonParams & ButtonStyleParams; type GameButtonParamsWithStyle = GameButtonParams & ButtonStyleParams; type PayButtonParamsWithStyle = PayButtonParams & ButtonStyleParams; type LoginButtonParamsWithStyle = LoginButtonParams & ButtonStyleParams; export declare class InlineKeyboardBuilder { private rows; private currentRow; /** whether the builder has no buttons (committed rows + current row) */ get isEmpty(): boolean; /** number of rows that will be emitted (committed rows + current row if non-empty) */ get rowCount(): number; /** total number of buttons across all rows including the in-progress row */ get length(): number; /** construct an `InlineKeyboardBuilder` from an existing `InlineKeyboardMarkup` JSON */ static from(markup: Interfaces.TelegramInlineKeyboardMarkup): InlineKeyboardBuilder; /** generate text button */ textButton(params: TextButtonParamsWithStyle): this; /** generate URL button */ urlButton(params: UrlButtonParamsWithStyle): this; /** generate Web App button */ webAppButton(params: WebAppButtonParamsWithStyle): this; /** generate button that will switch to current chat and type the query */ switchToCurrentChatButton(params: SwitchToCurrentChatButtonParamsWithStyle): this; /** generate button that will prompt user to select one of their chats */ switchToChatButton(params: SwitchToChatButtonParamsWithStyle): this; /** * generate button that will prompt user to select one of their chats of the * specified type, open that chat and insert the bot's username and the * specified inline query in the input field */ switchToChosenChatButton(params: SwitchToChosenChatButtonParamsWithStyle): this; /** generate game button */ gameButton(params: GameButtonParamsWithStyle): this; /** generate pay button */ payButton(params: PayButtonParamsWithStyle): this; /** generate login button */ loginButton(params: LoginButtonParamsWithStyle): this; /** save current row of buttons in the general rows */ row(): this; /** conditionally apply a chain of mutations to the builder */ if(condition: boolean, then: (builder: this) => void, otherwise?: (builder: this) => void): this; /** clone current builder to new instance */ clone(): InlineKeyboardBuilder; /** returns JSON which is compatible with Telegram's `InlineKeyboardMarkup` interface */ toJSON(): { inline_keyboard: Interfaces.TelegramInlineKeyboardButton[][]; }; toString(): string; private addButton; private addWideButton; } export {}; //# sourceMappingURL=inline-keyboard-builder.d.ts.map