import type { HostComponent, ViewProps } from 'react-native'; import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { SmartlookSensitiveViewType } from '../types/SmartlookSensitiveViewType'; export interface NativeProps extends ViewProps { isSensitive: boolean; } interface NativeCommands { changeIsViewSensitive: ( viewRef: React.ElementRef, isSensitive: boolean ) => void; } export const Commands: NativeCommands = codegenNativeCommands({ supportedCommands: ['changeIsViewSensitive'], }); /** * Provides a native View wrapper. It can be used to wrap a component that should be marked as sensitive or vice versa not sensitive. * Use `isSensitive` prop to control the sensitivity. * * @example * ```typescript * * I am a sensitive text! * * ``` */ export default codegenNativeComponent( 'SmartlookSensitiveView' ) as HostComponent;