{"version":3,"sources":["../../../src/window/clients/bar-code.ts"],"names":[],"mappings":"AAIO,MAAM,aAAc,CAAA;AAAA,EAChB,MAAA;AAAA,EAET,YAAY,MAAsB,EAAA;AAChC,IAAA,IAAA,CAAK,MAAS,GAAA,MAAA;AAAA;AAChB,EAEA,MAAM,KAAK,MAAuB,EAAA;AAChC,IAAA,MAAM,CAAC,GAAK,EAAA,GAAG,CAAI,GAAA,MAAM,KAAK,MAAO,CAAA,IAAA;AAAA,MACnC,mBAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,IAAI,KAAW,MAAA,GAAA;AACf,IAAO,OAAA,GAAA;AAAA;AAEX","file":"bar-code.mjs","sourcesContent":["import { ClientError } from '../client-error';\nimport { BarCodeConfig } from '../types';\nimport { WindowClient } from '../window-client';\n\nexport class BarCodeClient {\n  readonly window: WindowClient;\n\n  constructor(client: WindowClient) {\n    this.window = client;\n  }\n\n  async scan(config: BarCodeConfig) {\n    const [err, res] = await this.window.send<[ClientError | undefined, string]>(\n      'media.scanBarCode',\n      config\n    );\n\n    if (err) throw err;\n    return res;\n  }\n}\n"]}