import type { ReactNode } from "react"; import { VirtualizedList as RNVirtualizedList, type VirtualizedListProps, } from "react-native"; import { useCssElement, type StyledConfiguration, type StyledProps, } from "react-native-css"; import { copyComponentProperties } from "./copyComponentProperties"; const mapping: StyledConfiguration = { className: "style", ListFooterComponentClassName: "ListFooterComponentStyle", ListHeaderComponentClassName: "ListHeaderComponentStyle", contentContainerClassName: "contentContainerStyle", }; export const VirtualizedList = copyComponentProperties( RNVirtualizedList, function ( props: StyledProps, typeof mapping>, ) { return useCssElement(RNVirtualizedList, props, mapping); }, ) as unknown as typeof RNVirtualizedList & (( props: StyledProps< VirtualizedListProps, StyledConfiguration >, ) => ReactNode); export default VirtualizedList;