import {View} from 'react-native' // @ts-expect-error no type definition import ProgressPie from 'react-native-progress/Pie' import {type ImagePickerAsset} from 'expo-image-picker' import {clamp} from '#/lib/numbers' import {isWeb} from '#/platform/detection' import {atoms as a, useTheme} from '#/alf' import {ExternalEmbedRemoveBtn} from '../ExternalEmbedRemoveBtn' import {VideoTranscodeBackdrop} from './VideoTranscodeBackdrop' export function VideoTranscodeProgress({ asset, progress, clear, }: { asset: ImagePickerAsset progress: number clear: () => void }) { const t = useTheme() if (isWeb) return null let aspectRatio = asset.width / asset.height if (isNaN(aspectRatio)) { aspectRatio = 16 / 9 } aspectRatio = clamp(aspectRatio, 1 / 1, 3 / 1) return ( ) }