import React from 'react'; import { ImagePickerAsset } from 'expo-image-picker'; import Button from './Button'; import { useTranslation } from 'react-i18next'; import { photoStorageService } from '~/features/storage/photoStorage.service'; interface PhotoUploadButtonProps { onPhotosSelected: (photos: ImagePickerAsset[]) => void; loading?: boolean; disabled?: boolean; variant?: 'primary' | 'secondary' | 'outline'; title?: string; iconName?: string; style?: any; allowsMultipleSelection?: boolean; } export default function PhotoUploadButton({ onPhotosSelected, loading = false, disabled = false, variant = 'secondary', title, iconName = 'image-outline', style, allowsMultipleSelection = true, }: PhotoUploadButtonProps) { const { t } = useTranslation(); const handlePress = async () => { try { const photos = await photoStorageService.selectPhotos({ allowsMultipleSelection, quality: 0.8, }); if (photos.length > 0) { onPhotosSelected(photos); } } catch (error) { console.debug('Error selecting photos:', error); // You might want to show an error toast here } }; return (