{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "native-only-animated-view",
  "type": "registry:ui",
  "title": "Native Only Animated View",
  "author": "@mrzachnugent",
  "description": "A component that is only rendered and animated on native platforms.",
  "files": [
    {
      "path": "./node_modules/@rnr/registry/src/nativewind/components/ui/native-only-animated-view.tsx",
      "content": "import { Platform, Pressable } from 'react-native';\nimport Animated from 'react-native-reanimated';\n\nconst AnimatedPressable = Animated.createAnimatedComponent(Pressable);\n\n/**\n * This component is used to wrap animated views that should only be animated on native.\n * @param props - The props for the animated view.\n * @returns The animated view if the platform is native, otherwise the children.\n * @example\n * <NativeOnlyAnimatedView entering={FadeIn} exiting={FadeOut}>\n *   <Text>I am only animated on native</Text>\n * </NativeOnlyAnimatedView>\n */\nfunction NativeOnlyAnimatedView(\n  props: (React.ComponentProps<typeof Animated.View> & React.RefAttributes<typeof Animated.View> \n    & { as?: \"View\" }) | (React.ComponentProps<typeof AnimatedPressable> & React.RefAttributes<typeof AnimatedPressable> & { as: \"Pressable\" })\n) {\n  if (Platform.OS === 'web') {\n    return <>{props.children as React.ReactNode}</>;\n  } else {\n    if (props.as === \"Pressable\"){\n      return <AnimatedPressable {...props} />;\n    }\n    return <Animated.View {...props} />;\n  }\n}\n\nexport { NativeOnlyAnimatedView };\n",
      "type": "registry:ui"
    }
  ]
}