import { ipcRenderer } from 'electron' ; import { apiCmds , apiName , IScreenSnippet } from '../common/api-interface' ; deprecated export class ScreenSnippetBcHandler { deprecated public capture ( ) { return new Promise ( ( resolve , reject ) => { ipcRenderer . send ( apiName . symphonyApi , { cmd : apiCmds . openScreenSnippet , } ) ; ipcRenderer . on ( 'screen-snippet-data' , ( _event , arg ) => { if ( arg . type === 'ERROR' ) { reject ( arg ) ; return ; } resolve ( arg ) ; } ) ; } ) ; } deprecated public cancel ( ) { ipcRenderer . send ( apiName . symphonyApi , { cmd : apiCmds . closeScreenSnippet , } ) ; } }