import camera from "@ohos.multimedia.camera"; import image from "@ohos.multimedia.image"; import { LaunchConfig } from './LaunchConfig'; import { OutputConfig } from './OutputConfig'; import { getFullScreenSize } from './Utils'; import { WeCameraImpl } from './internal/WeCameraImpl'; export var WeCamera; (function (q22) { function r22(a23, b23) { let c23 = image.createImageReceiver(a23.swap(), image.ImageFormat.JPEG, 4); c23.on('imageArrival', async () => { c23.readNextImage().then(async (f23) => { try { if (b23 != undefined) { await b23(f23); } } catch (g23) { } finally { await f23.release(); } }); }); return c23; } q22.getDefaultImageReceiver = r22; function s22(w22) { try { let y22 = w22.getApplicationContext(); let z22 = camera.getCameraManager(y22); if (z22 == undefined) { return undefined; } return new WeCameraImpl(z22, y22); } catch (x22) { } return undefined; } q22.getWeCameraController = s22; function t22(u22) { let v22 = new OutputConfig(u22, getFullScreenSize()); return new LaunchConfig(v22); } q22.getDefaultFullScreenCameraConfig = t22; })(WeCamera || (WeCamera = {})); 