import type { ComponentType } from 'react'; import type { ViewProps } from 'react-native'; import type { DirectEventHandler, Int32, } from 'react-native/Libraries/Types/CodegenTypes'; // eslint-disable-next-line @react-native/no-deep-imports import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; // eslint-disable-next-line @react-native/no-deep-imports import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; export type ScreenReaderFocusChange = Readonly<{ isFocused: boolean; }>; export type ScreenReaderDescendantFocusChanged = Readonly<{ status: string; }>; export interface A11yIndexNativeComponentProps extends ViewProps { orderIndex: Int32; orderKey: string; orderFocusType: Int32; onScreenReaderFocusChange?: DirectEventHandler; } export interface NativeCommands { // @ts-ignore focus: (viewRef: React.ElementRef) => void; } export const Commands: NativeCommands = codegenNativeCommands({ supportedCommands: ['focus'], }); export default codegenNativeComponent( 'A11yIndexView' );