| 
									
										
										
										
											2023-11-09 11:19:08 -08:00
										 |  |  | import * as React from 'react'; | 
					
						
							|  |  |  | import { StyleSheet } from 'react-native'; | 
					
						
							| 
									
										
										
										
											2024-03-09 03:15:13 -08:00
										 |  |  | import { themeStyle } from './global-style'; | 
					
						
							| 
									
										
										
										
											2017-07-14 18:49:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-05 12:16:49 +01:00
										 |  |  | // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
 | 
					
						
							| 
									
										
										
										
											2023-11-09 11:19:08 -08:00
										 |  |  | const rootStyles_: Record<number, any> = {}; | 
					
						
							| 
									
										
										
										
											2017-08-01 17:59:01 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-09 11:19:08 -08:00
										 |  |  | class BaseScreenComponent<Props, State> extends React.Component<Props, State> { | 
					
						
							| 
									
										
										
										
											2017-07-31 22:03:12 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-09 11:19:08 -08:00
										 |  |  | 	protected rootStyle(themeId: number) { | 
					
						
							| 
									
										
										
										
											2017-08-01 17:59:01 +00:00
										 |  |  | 		const theme = themeStyle(themeId); | 
					
						
							|  |  |  | 		if (rootStyles_[themeId]) return rootStyles_[themeId]; | 
					
						
							|  |  |  | 		rootStyles_[themeId] = StyleSheet.create({ | 
					
						
							|  |  |  | 			root: { | 
					
						
							|  |  |  | 				flex: 1, | 
					
						
							|  |  |  | 				backgroundColor: theme.backgroundColor, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}); | 
					
						
							|  |  |  | 		return rootStyles_[themeId]; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2017-07-14 18:49:14 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-09 11:19:08 -08:00
										 |  |  | export { BaseScreenComponent }; | 
					
						
							|  |  |  | export default BaseScreenComponent; |