import { Page, withSBErrorHandling } from '../types'; import { ScanbotSDKNativeModule } from './ScanbotSDKModule'; /** * @internal * @hidden */ export const ScanbotLegacyPageImpl = { async removePage(page: Page): Promise { return withSBErrorHandling(() => ScanbotSDKNativeModule.removeLegacyPage({ page: page })); }, async removeAllPages(): Promise { return withSBErrorHandling(ScanbotSDKNativeModule.removeAllLegacyPages); }, async setDocumentImage(params: { imageFileUri: string; page: Page }): Promise { return withSBErrorHandling(() => ScanbotSDKNativeModule.setDocumentImageOnLegacyPage(params)); }, async refreshImageUris(pages: Page[]): Promise { return withSBErrorHandling(async () => { return await ScanbotSDKNativeModule.refreshImageUrisOnLegacyPage({ pages: pages }); }); }, };