import { CommonModule } from "@angular/common"; import { Component } from "@angular/core"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { DialogRef, AsyncActionsModule, ButtonModule, DialogModule } from "@bitwarden/components"; import { ImportComponent } from "@bitwarden/importer-ui"; @Component({ templateUrl: "import-desktop.component.html", imports: [ CommonModule, JslibModule, DialogModule, AsyncActionsModule, ButtonModule, ImportComponent, ], }) export class ImportDesktopComponent { protected disabled = false; protected loading = false; constructor(public dialogRef: DialogRef) {} /** * Callback that is called after a successful import. */ protected async onSuccessfulImport(organizationId: string): Promise { this.dialogRef.close(); } protected onLoadProfilesFromBrowser(browser: string): Promise { return ipc.tools.chromiumImporter.getAvailableProfiles(browser); } protected onImportFromBrowser(browser: string, profile: string): Promise { return ipc.tools.chromiumImporter.importLogins(browser, profile); } }