import { IpcMessages , ProcessMainAdapter , FileManagerAdapter , File } from '@vcr/domain' ; export class ElectronFileManager implements FileManagerAdapter { constructor ( private electron ) { } async selectFile ( types ) { const { payload } = await this . electron . request ( IpcMessages . SelectFile , { payload : types } ) ; return payload ; } async selectDirectory ( ) { const { payload } = await this . electron . request ( IpcMessages . SelectDirectory ) ; return payload ; } async openFile ( file ) { const { payload } = await this . electron . request ( IpcMessages . OpenFile , { payload : file } ) ; return payload ; } }