'use client'; // eslint-disable-next-line @react-native/no-deep-imports import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { ColorValue, ImageSource, ProcessedColorValue, ViewProps, } from 'react-native'; import { DirectEventHandler, Float, Int32, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; import { UnsafeMixed } from './codegenUtils'; // iOS-specific: SFSymbol, image as a template usage export type IconType = 'image' | 'template' | 'sfSymbol'; // eslint-disable-next-line @typescript-eslint/ban-types type GenericEmptyEvent = Readonly<{}>; type LifecycleStateChangeEvent = Readonly<{ previousState: Int32; newState: Int32; }>; export type ItemStateAppearance = { tabBarItemTitleFontFamily?: string; tabBarItemTitleFontSize?: Float; tabBarItemTitleFontWeight?: string; tabBarItemTitleFontStyle?: string; tabBarItemTitleFontColor?: ProcessedColorValue | null; tabBarItemTitlePositionAdjustment?: { horizontal?: Float; vertical?: Float; }; tabBarItemIconColor?: ProcessedColorValue | null; tabBarItemBadgeBackgroundColor?: ProcessedColorValue | null; }; export type ItemAppearance = { normal?: ItemStateAppearance; selected?: ItemStateAppearance; focused?: ItemStateAppearance; disabled?: ItemStateAppearance; }; export type Appearance = { stacked?: ItemAppearance; inline?: ItemAppearance; compactInline?: ItemAppearance; tabBarBackgroundColor?: ProcessedColorValue | null; tabBarShadowColor?: ProcessedColorValue | null; tabBarBlurEffect?: WithDefault; }; type BlurEffect = | 'none' | 'systemDefault' | 'extraLight' | 'light' | 'dark' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark'; type Orientation = | 'inherit' | 'all' | 'allButUpsideDown' | 'portrait' | 'portraitUp' | 'portraitDown' | 'landscape' | 'landscapeLeft' | 'landscapeRight'; type SystemItem = | 'none' | 'bookmarks' | 'contacts' | 'downloads' | 'favorites' | 'featured' | 'history' | 'more' | 'mostRecent' | 'mostViewed' | 'recents' | 'search' | 'topRated'; export interface NativeProps extends ViewProps { // Events onLifecycleStateChange?: DirectEventHandler; onWillAppear?: DirectEventHandler; onDidAppear?: DirectEventHandler; onWillDisappear?: DirectEventHandler; onDidDisappear?: DirectEventHandler; // Control isFocused?: boolean; tabKey: string; // General title?: string | undefined | null; badgeValue?: string; // Currently iOS-only orientation?: WithDefault; // Android-specific image handling iconResourceName?: string; iconResource?: ImageSource; tabBarItemBadgeTextColor?: ColorValue; tabBarItemBadgeBackgroundColor?: ColorValue; // iOS-specific standardAppearance?: UnsafeMixed; scrollEdgeAppearance?: UnsafeMixed; iconType?: WithDefault; iconImageSource?: ImageSource; iconSfSymbolName?: string; selectedIconImageSource?: ImageSource; selectedIconSfSymbolName?: string; systemItem?: WithDefault; specialEffects?: { repeatedTabSelection?: { popToRoot?: WithDefault; scrollToTop?: WithDefault; }; }; overrideScrollViewContentInsetAdjustmentBehavior?: WithDefault; } export default codegenNativeComponent('RNSBottomTabsScreen', {});