{"version":3,"sources":["../../../src/window/clients/app-install-dialog.ts"],"names":[],"mappings":"AAYO,MAAM,sBAAuB,CAAA;AAAA,EACzB,MAAA;AAAA,EAET,YAAY,MAAsB,EAAA;AAChC,IAAA,IAAA,CAAK,MAAS,GAAA,MAAA;AAAA;AAChB,EAEA,MAAM,KAAK,MAAoC,EAAA;AAC7C,IAAA,MAAM,CAAC,EAAI,EAAA,GAAG,CAAI,GAAA,MAAM,KAAK,MAAO,CAAA,IAAA;AAAA,MAClC,uCAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,IAAI,CAAC,EAAI,EAAA;AACP,MAAA,MAAM,EAAE,SAAA,EAAW,GAAK,EAAA,OAAA,EAAS,GAAI,EAAA;AAAA;AAGvC,IAAO,OAAA,GAAA;AAAA;AAEX","file":"app-install-dialog.mjs","sourcesContent":["import { WindowClient } from '../window-client';\n\n/**\n * Represents set of parameters needed to open the appInstallDialog.\n */\nexport interface OpenAppInstallDialogParams {\n  /**\n   * A unique identifier for the app being installed.\n   */\n  appId: string;\n}\n\nexport class AppInstallDialogClient {\n  readonly window: WindowClient;\n\n  constructor(client: WindowClient) {\n    this.window = client;\n  }\n\n  async open(params: OpenAppInstallDialogParams) {\n    const [ok, res] = await this.window.send<[boolean, string]>(\n      'appInstallDialog.openAppInstallDialog',\n      params\n    );\n\n    if (!ok) {\n      throw { errorCode: 500, message: res };\n    }\n\n    return res;\n  }\n}\n"]}