import { WebApp } from '../WebApp'; import { Bridge } from '../Bridge'; import { EventEmitter } from 'twa-core'; import { BackButtonEventsMap } from './events'; declare const ee: EventEmitter; /** * Class which controls the back button, which can be displayed in the header * of the Web App in the Telegram interface. * * TODO: Component requires event which states, button was hidden or shown * from outside. * * TODO: BackButton works explicitly in case, modal is not expanded. It means, * when you call show(), it looks like nothing happens, but in case, you * expand a Web App modal, back button shows up. */ export declare class BackButton { private bridge; private webApp; private ee; private _isVisible; /** * Updates current visibility state. * * @since Web App version 6.1+ * @private */ private set isVisible(value); constructor(bridge: Bridge, webApp: WebApp); /** * Hides the button. */ hide: () => void; /** * Shows whether the button is visible. */ get isVisible(): boolean; /** * Adds new event listener. * * @param event - event name. * @param listener - event listener. */ on: typeof ee['on']; /** * Removes event listener. * * @param event - event name. * @param listener - event listener. */ off: typeof ee['off']; /** * Shows the button. */ show: () => void; } export {};