import { Inject , Injectable , Injector , INJECTOR } from '@angular/core' ; import { Observable } from 'rxjs' ; import { IframeService } from 'src/app/core/services/iframe/iframe.service' ; import { PolymorpheusComponent } from '@tinkoff/ng-polymorpheus' ; import { WalletsModalComponent } from 'src/app/core/wallets/components/wallets-modal/wallets-modal.component' ; import { TuiDialogService } from '@taiga-ui/core' ; @ Injectable ( ) export class WalletsModalService { constructor ( @ Inject ( INJECTOR ) private readonly injector , private readonly dialogService , private readonly iframeService ) { } public open ( ) { const size = this . iframeService . isIframe ? 'fullscreen' : 's' ; return this . dialogService . open ( new PolymorpheusComponent ( WalletsModalComponent , this . injector ) , { size } ) ; } public open$ ( ) { this . open ( ) . subscribe ( ) ; } }