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,CAAC,CAAC;IACH,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AAC7E,CAAC,CAA2B,CAAC","sourcesContent":["import React, { ComponentType, forwardRef, PropsWithChildren } from 'react';\nimport { Platform } from 'react-native';\n\nimport Text, { TextProps } from '../primitives/Text';\nimport View, { ViewProps } from '../primitives/View';\n\nfunction createView(nativeProps: ViewProps = {}): ComponentType<ViewProps> {\n return forwardRef((props: ViewProps, ref) => {\n return <View {...nativeProps} {...props} ref={ref} />;\n }) as ComponentType<ViewProps>;\n}\n\nexport const UL = createView(\n Platform.select({\n web: {\n accessibilityRole: 'list',\n },\n })\n);\n\nfunction isTextProps(props: any): props is TextProps {\n // Treat <li></li> as a Text element.\n return typeof props.children === 'string';\n}\n\ntype LIProps = TextProps | ViewProps;\n\nexport const LI = forwardRef((props: PropsWithChildren<LIProps>, ref: any) => {\n if (isTextProps(props)) {\n const accessibilityRole: LIProps['accessibilityRole'] = Platform.select({\n web: 'listitem',\n default: props.accessibilityRole,\n });\n return <Text {...props} accessibilityRole={accessibilityRole} ref={ref} />;\n }\n const accessibilityRole: LIProps['accessibilityRole'] = Platform.select({\n web: 'listitem',\n default: props.accessibilityRole,\n });\n return <View {...props} accessibilityRole={accessibilityRole} ref={ref} />;\n}) as ComponentType<LIProps>;\n"]}