import React from 'react'; import { Platform, StyleSheet, Text, View } from 'react-native'; import { NativeSubjectLiftView } from './NativeSubjectLiftView'; import { SubjectLiftViewAndroid } from './SubjectLiftViewAndroid'; import type { SubjectLiftViewProps } from '../types'; /** * SubjectLiftView * * iOS → VisionKit `ImageAnalysisInteraction`: full native subject lift UX * (long-press glow + lift animation + copy/share sheet), identical to Photos.app * * Android → ML Kit `SubjectSegmenter`: segments the subject, then plays a * Reanimated spring lift animation over a blurred background * * Requires iOS 16+ / Android API 24+ * * @example * { * if (nativeEvent.status === 'ready') console.log('Ready to lift!'); * }} * onSubjectLifted={({ nativeEvent }) => { * const { type, data } = nativeEvent; * }} * /> */ export function SubjectLiftView(props: SubjectLiftViewProps) { if (Platform.OS === 'ios') { return ( ); } if (Platform.OS === 'android') { return ; } // Unsupported platform fallback return ( SubjectLiftView is not supported on this platform ); } const styles = StyleSheet.create({ fill: { flex: 1 }, fallback: { flex: 1, alignItems: 'center', justifyContent: 'center', backgroundColor: '#111', }, fallbackText: { color: '#666', fontSize: 13, textAlign: 'center', paddingHorizontal: 24, }, });