diff --git a/src/app/services/telegram/telegram.service.ts b/src/app/services/telegram/telegram.service.ts index 0463b40..dc4b76d 100644 --- a/src/app/services/telegram/telegram.service.ts +++ b/src/app/services/telegram/telegram.service.ts @@ -1,15 +1,7 @@ import { Inject, Injectable } from '@angular/core'; import { DOCUMENT } from '@angular/common'; +import { TgButton, TgPopupParams } from '../../static/interfaces/telegram.interfaces'; -interface TgButton { - show: () => void; - hide: () => void; - setText: (text: string) => void; - onClick: (callback: Function) => void; - offClick: (callback: Function) => void; - showProgress: (leaveActive: boolean) => void; - hideProgress: () => void; -} @Injectable({ providedIn: 'root', @@ -27,4 +19,8 @@ export class TelegramService { get MainButton(): TgButton { return this.tg.MainButton; } + + showPopup(tgPopupParams: TgPopupParams): void { + return this.tg.showPopup(tgPopupParams); + } }