import { TurboModule, TurboModuleRegistry } from 'react-native'; interface Spec extends TurboModule { setSecureFlags(): void configureSnapshotProtectionStrategy(shouldProtectFromSnapshot: boolean, style: string): void } const SnapshotProtectionModule = TurboModuleRegistry.getEnforcing('UNComponentsSnapshotProtectionModule'); class UNSnapshotProtectionHelper { static setAndroidSecurity() { /** * Set secure flag on the activity's window (if it doesn't exist) */ SnapshotProtectionModule.setSecureFlags(); } static setIosSecurity(shouldProtectFromSnapshot: boolean, style: string) { /** * Activate a Global native service for managing the snapshotProtection by the given arguments. */ SnapshotProtectionModule.configureSnapshotProtectionStrategy(shouldProtectFromSnapshot, style); } } export default UNSnapshotProtectionHelper;